From f6b161b6cc2bdeda5b973b76a7765fbde53ffdb1 Mon Sep 17 00:00:00 2001
From: Sean Busbey <sean.busbey@gmail.com>
Date: Mon, 4 Jul 2016 18:05:06 -0500
Subject: [PATCH] [scripts, couchbase] deprecate the old 'couchbase' client in
 favor of 'couchbase2'.

---
 bin/ycsb     | 4 ++++
 bin/ycsb.bat | 5 +++++
 bin/ycsb.sh  | 6 ++++++
 3 files changed, 15 insertions(+)

diff --git a/bin/ycsb b/bin/ycsb
index 4db2926e..dad1fab2 100755
--- a/bin/ycsb
+++ b/bin/ycsb
@@ -249,6 +249,10 @@ def main():
              "cassandra-cql' clients are deprecated. If you are using "
              "Cassandra 2.X try using the 'cassandra2-cql' client instead.")
 
+    if binding == "couchbase":
+        warn("The 'couchbase' client has been deprecated. If you are using "
+             "Couchbase 4.0+ try using the 'couchbase2' client instead.")
+
     if is_distribution():
         db_dir = os.path.join(ycsb_home, binding + "-binding")
         # include top-level conf for when we're a binding-specific artifact.
diff --git a/bin/ycsb.bat b/bin/ycsb.bat
index a43a1677..bd609481 100644
--- a/bin/ycsb.bat
+++ b/bin/ycsb.bat
@@ -183,6 +183,11 @@ IF NOT "%BINDING_DIR%" == "cassandra" GOTO notOldCassandra
 echo [WARN] The 'cassandra-7', 'cassandra-8', 'cassandra-10', and cassandra-cql' clients are deprecated. If you are using Cassandra 2.X try using the 'cassandra2-cql' client instead.
 :notOldCassandra
 
+@REM Couchbase deprecation message
+IF NOT "%BINDING_DIR%" == "couchbase" GOTO notOldCouchbase
+echo [WARN] The 'couchbase' client is deprecated. If you are using Couchbase 4.0+ try using the 'couchbase2' client instead.
+:notOldCouchbase
+
 @REM Get the rest of the arguments, skipping the first 2
 FOR /F "tokens=2*" %%G IN ("%*") DO (
   SET YCSB_ARGS=%%H
diff --git a/bin/ycsb.sh b/bin/ycsb.sh
index efdb58bd..cc882602 100755
--- a/bin/ycsb.sh
+++ b/bin/ycsb.sh
@@ -215,6 +215,12 @@ cassandra-cql' clients are deprecated. If you are using \
 Cassandra 2.X try using the 'cassandra2-cql' client instead."
 fi
 
+# Couchbase deprecation message
+if [ "${BINDING_DIR}" = "couchbase" ] ; then
+  echo "[WARN] The 'couchbase' client is deprecated. If you are using \
+Couchbase 4.0+ try using the 'couchbase2' client instead."
+fi
+
 # For Cygwin, switch paths to Windows format before running java
 if $CYGWIN; then
   [ -n "$JAVA_HOME" ] && JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
-- 
GitLab