diff --git a/googledatastore/pom.xml b/googledatastore/pom.xml index 8ddd1d9c5a599813ddcfdf620d54c0648a8951af..0f39aa3aaf6115082c8aa042518b308d84f6f04f 100644 --- a/googledatastore/pom.xml +++ b/googledatastore/pom.xml @@ -35,7 +35,7 @@ LICENSE file. <name>sonatype-snapshots</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> <snapshots> - <enabled>true</enabled> + <enabled>true</enabled> </snapshots> </repository> </repositories> @@ -62,28 +62,4 @@ LICENSE file. <scope>provided</scope> </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.15</version> - <configuration> - <consoleOutput>true</consoleOutput> - <configLocation>../checkstyle.xml</configLocation> - <failOnViolation>true</failOnViolation> - <failsOnError>false</failsOnError> - </configuration> - <executions> - <execution> - <id>validate</id> - <phase>validate</phase> - <goals> - <goal>checkstyle</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> </project> 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 7077455d26a7a84a0f6c0410cab4bef6e6a52e84..a3f6553427d49565c61317474b3ceaaae74ab22e 100644 --- a/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java +++ b/googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java @@ -242,6 +242,7 @@ public class GoogleDatastoreClient extends DB { @Override public Status update(String table, String key, HashMap<String, ByteIterator> values) { + return doSingleItemMutation(table, key, values, MutationType.UPDATE); } @@ -285,8 +286,10 @@ public class GoogleDatastoreClient extends DB { // for multi-item mutation, or Read-modify-write operation. CommitRequest.Builder commitRequest = CommitRequest.newBuilder(); commitRequest.setMode(Mode.NON_TRANSACTIONAL); + if (mutationType == MutationType.DELETE) { commitRequest.addMutationsBuilder().setDelete(datastoreKey); + } else { // If this is not for delete, build the entity. Entity.Builder entityBuilder = Entity.newBuilder();