From 98b845fd741fd67003291bb06d7d187217ccd8dc Mon Sep 17 00:00:00 2001
From: Stanley Feng <stfeng@google.com>
Date: Mon, 23 Nov 2015 09:25:48 -0800
Subject: [PATCH] [googledatastore] Address latest CR comments @busbey

Copyright statement, better exception messages, etc.
---
 googledatastore/README.md                         |  2 +-
 googledatastore/conf/googledatastore.properties   |  6 +++---
 googledatastore/pom.xml                           |  2 +-
 .../com/yahoo/ycsb/db/GoogleDatastoreClient.java  | 15 ++++++++-------
 .../main/java/com/yahoo/ycsb/db/package-info.java |  2 +-
 5 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/googledatastore/README.md b/googledatastore/README.md
index 0c52f576..a6755a65 100644
--- a/googledatastore/README.md
+++ b/googledatastore/README.md
@@ -1,5 +1,5 @@
 <!--
-Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors.
+Copyright (c) 2015 YCSB contributors.
 All rights reserved.
 
 Licensed under the Apache License, Version 2.0 (the "License"); you
diff --git a/googledatastore/conf/googledatastore.properties b/googledatastore/conf/googledatastore.properties
index 0f1189c7..ac95b570 100644
--- a/googledatastore/conf/googledatastore.properties
+++ b/googledatastore/conf/googledatastore.properties
@@ -34,10 +34,10 @@ readallfields = true
 
 ## Optional parameters
 #
-# Decides the consistency level of read requests. Acceptable value is:
-# EVENTUAL, STRONG (default is EVENTUAL)
+# Decides the consistency level of read requests. Acceptable values are:
+# EVENTUAL, STRONG (default is STRONG)
 #
-# googledatastore.readConsistency=EVENTUAL
+# googledatastore.readConsistency=STRONG
 
 # Decides how we group entities into entity groups. 
 # (See the details section in README.md for documentation)
diff --git a/googledatastore/pom.xml b/googledatastore/pom.xml
index 19abce65..e7ab3eac 100644
--- a/googledatastore/pom.xml
+++ b/googledatastore/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- 
-Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved.
+Copyright (c) 2015 YCSB contributors. All rights reserved.
 
 Licensed under the Apache License, Version 2.0 (the "License"); you
 may not use this file except in compliance with the License. You
diff --git a/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java b/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java
index f2f64410..9e086699 100644
--- a/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java
+++ b/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Google Inc. All Rights Reserved.
+ * Copyright 2015 YCSB contributors. All Rights Reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you
  * may not use this file except in compliance with the License. You
@@ -49,7 +49,6 @@ import javax.annotation.Nullable;
 
 /**
  * Google Cloud Datastore Client for YCSB.
- * Author: stfeng@
  */
 
 public class GoogleDatastoreClient extends DB {
@@ -73,9 +72,9 @@ public class GoogleDatastoreClient extends DB {
   private static Logger logger =
       Logger.getLogger(GoogleDatastoreClient.class);
 
-  // Read consistency defaults to "eventual" (this is the same as other
-  // DB client, such as DynamoDB). User can override this via configure.
-  private ReadConsistency readConsistency = ReadConsistency.EVENTUAL;
+  // Read consistency defaults to "STRONG" per YCSB guidance.
+  // User can override this via configure.
+  private ReadConsistency readConsistency = ReadConsistency.STRONG;
 
   private EntityGroupingMode entityGroupingMode =
       EntityGroupingMode.ONE_ENTITY_PER_GROUP;
@@ -172,11 +171,13 @@ public class GoogleDatastoreClient extends DB {
 
     } catch (GeneralSecurityException exception) {
       throw new DBException("Security error connecting to the datastore: " +
-            exception.getMessage());
+            "cause: " + exception.getCause() +
+            " details: " + exception.getMessage());
 
     } catch (IOException exception) {
       throw new DBException("I/O error connecting to the datastore: " +
-            exception.getMessage());
+            "cause: " + exception.getCause() +
+            " details: " + exception.getMessage());
     }
 
     logger.info("Datastore client instance created: " +
diff --git a/googledatastore/src/main/java/com/yahoo/ycsb/db/package-info.java b/googledatastore/src/main/java/com/yahoo/ycsb/db/package-info.java
index c0560d64..bccdf1e6 100644
--- a/googledatastore/src/main/java/com/yahoo/ycsb/db/package-info.java
+++ b/googledatastore/src/main/java/com/yahoo/ycsb/db/package-info.java
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2015 Google Inc. All rights reserved.
+ * Copyright (c) 2015 YCSB contributors. All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you
  * may not use this file except in compliance with the License. You
-- 
GitLab