Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YCSB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
d9eecd20
Commit
d9eecd20
authored
8 years ago
by
Chris Larsen
Browse files
Options
Downloads
Patches
Plain Diff
[googlebigtable] Fix #697 by synchronizing on the static Config object
who's address does not change.
parent
e5d67bf3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
googlebigtable/src/main/java/com/yahoo/ycsb/db/GoogleBigtableClient.java
+4
-4
4 additions, 4 deletions
...src/main/java/com/yahoo/ycsb/db/GoogleBigtableClient.java
with
4 additions
and
4 deletions
googlebigtable/src/main/java/com/yahoo/ycsb/db/GoogleBigtableClient.java
+
4
−
4
View file @
d9eecd20
...
...
@@ -74,8 +74,8 @@ public class GoogleBigtableClient extends com.yahoo.ycsb.DB {
private
static
final
String
ASYNC_MAX_INFLIGHT_RPCS
=
"mutatorMaxInflightRPCs"
;
private
static
final
String
CLIENT_SIDE_BUFFERING
=
"clientbuffering"
;
/**
Must be an object for synchronization and t
rack
ing
running thread counts. */
private
static
I
nt
eger
threadCount
=
0
;
/**
T
rack
s
running thread counts
so we know when to close the session
. */
private
static
i
nt
threadCount
=
0
;
/** This will load the hbase-site.xml config file and/or store CLI options. */
private
static
final
Configuration
CONFIG
=
HBaseConfiguration
.
create
();
...
...
@@ -125,7 +125,7 @@ public class GoogleBigtableClient extends com.yahoo.ycsb.DB {
System
.
err
.
println
(
"Running Google Bigtable with Proto API"
+
(
clientSideBuffering
?
" and client side buffering."
:
"."
));
synchronized
(
threadCount
)
{
synchronized
(
CONFIG
)
{
++
threadCount
;
if
(
session
==
null
)
{
try
{
...
...
@@ -176,7 +176,7 @@ public class GoogleBigtableClient extends com.yahoo.ycsb.DB {
throw
new
DBException
(
e
);
}
}
synchronized
(
threadCount
)
{
synchronized
(
CONFIG
)
{
--
threadCount
;
if
(
threadCount
<=
0
)
{
try
{
...
...
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