Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YCSB
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adnan Ahmad
YCSB
Commits
9b207cd5
Commit
9b207cd5
authored
8 years ago
by
yuyanting
Browse files
Options
Downloads
Patches
Plain Diff
[googledatastore] Address code review comments.
parent
94e5d6fd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
googledatastore/pom.xml
+1
-25
1 addition, 25 deletions
googledatastore/pom.xml
googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java
+3
-0
3 additions, 0 deletions
...rc/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java
with
4 additions
and
25 deletions
googledatastore/pom.xml
+
1
−
25
View file @
9b207cd5
...
...
@@ -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>
This diff is collapsed.
Click to expand it.
googledatastore/src/main/java/com/yahoo/ycsb/db/GoogleDatastoreClient.java
+
3
−
0
View file @
9b207cd5
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment