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
25e0ec89
Commit
25e0ec89
authored
9 years ago
by
bigbes
Browse files
Options
Downloads
Patches
Plain Diff
Issue #319: [tarantool] Error on scan operation and replace problems
closes #319
parent
45631e8b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java
+7
-5
7 additions, 5 deletions
...tool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java
with
7 additions
and
5 deletions
tarantool/src/main/java/com/yahoo/ycsb/db/TarantoolClient.java
+
7
−
5
View file @
25e0ec89
...
...
@@ -92,7 +92,7 @@ public class TarantoolClient extends DB {
j
+=
2
;
}
try
{
this
.
connection
.
insert
(
this
.
spaceNo
,
tuple
);
this
.
connection
.
replace
(
this
.
spaceNo
,
tuple
);
}
catch
(
TarantoolException
exc
)
{
logger
.
log
(
Level
.
SEVERE
,
"Can't insert element"
,
exc
);
return
1
;
...
...
@@ -131,7 +131,7 @@ public class TarantoolClient extends DB {
public
int
scan
(
String
table
,
String
startkey
,
int
recordcount
,
Set
<
String
>
fields
,
Vector
<
HashMap
<
String
,
ByteIterator
>>
result
)
{
List
<
String
>
response
;
List
<
List
<
String
>
>
response
;
try
{
response
=
this
.
connection
.
select
(
this
.
spaceNo
,
0
,
Arrays
.
asList
(
startkey
),
0
,
recordcount
,
6
);
}
catch
(
TarantoolException
exc
)
{
...
...
@@ -140,9 +140,11 @@ public class TarantoolClient extends DB {
}
catch
(
NullPointerException
exc
)
{
return
1
;
}
HashMap
<
String
,
ByteIterator
>
temp
=
tuple_convert_filter
(
response
,
fields
);
if
(!
temp
.
isEmpty
())
result
.
add
((
HashMap
<
String
,
ByteIterator
>)
temp
.
clone
());
for
(
List
<
String
>
i:
response
)
{
HashMap
<
String
,
ByteIterator
>
temp
=
tuple_convert_filter
(
i
,
fields
);
if
(!
temp
.
isEmpty
())
result
.
add
((
HashMap
<
String
,
ByteIterator
>)
temp
.
clone
());
}
return
0
;
}
...
...
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