Skip to content
Snippets Groups Projects
Commit 98b845fd authored by Stanley Feng's avatar Stanley Feng
Browse files

[googledatastore] Address latest CR comments @busbey

Copyright statement, better exception messages, etc.
parent 93ebc177
No related branches found
No related tags found
No related merge requests found
<!--
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
......
......@@ -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)
......
<?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
......
/*
* 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: " +
......
/**
* 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment