From 3f077150f5ca18c638adada91227822954b04999 Mon Sep 17 00:00:00 2001
From: Sean Busbey <sean.busbey@gmail.com>
Date: Thu, 19 Apr 2018 14:26:20 -0500
Subject: [PATCH] [hbase10] Remove use of guava

- module previously had an undeclared dependency on guava
- removed VisibleForTesting in favor of a comment
- removed Preconditions.checkNotNull in favor of NPE through use

closes #1136
---
 .../src/main/java/com/yahoo/ycsb/db/HBaseClient10.java   | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java b/hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
index 12b13d99..d7088597 100644
--- a/hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
+++ b/hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
@@ -15,9 +15,6 @@
 
 package com.yahoo.ycsb.db;
 
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Preconditions;
-
 import com.yahoo.ycsb.ByteArrayByteIterator;
 import com.yahoo.ycsb.ByteIterator;
 import com.yahoo.ycsb.DBException;
@@ -438,7 +435,7 @@ public class HBaseClient10 extends com.yahoo.ycsb.DB {
 
     try {
       if (clientSideBuffering) {
-        Preconditions.checkNotNull(bufferedMutator);
+        // removed Preconditions.checkNotNull, which throws NPE, in favor of NPE on next line
         bufferedMutator.mutate(p);
       } else {
         currentTable.put(p);
@@ -506,7 +503,7 @@ public class HBaseClient10 extends com.yahoo.ycsb.DB {
     d.setDurability(durability);
     try {
       if (clientSideBuffering) {
-        Preconditions.checkNotNull(bufferedMutator);
+        // removed Preconditions.checkNotNull, which throws NPE, in favor of NPE on next line
         bufferedMutator.mutate(d);
       } else {
         currentTable.delete(d);
@@ -521,7 +518,7 @@ public class HBaseClient10 extends com.yahoo.ycsb.DB {
     return Status.OK;
   }
 
-  @VisibleForTesting
+  // Only non-private for testing.
   void setConfiguration(final Configuration newConfig) {
     this.config = newConfig;
   }
-- 
GitLab