[googledatastore] Address latest CR comments @busbey

Copyright statement, better exception messages, etc.
This commit is contained in:
Stanley Feng 2015-11-23 09:25:48 -08:00
Родитель 93ebc1770b
Коммит 98b845fd74
5 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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)

Просмотреть файл

@ -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

Просмотреть файл

@ -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: " +

Просмотреть файл

@ -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