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
095e9679
Commit
095e9679
authored
9 years ago
by
Connor McCoy
Browse files
Options
Downloads
Patches
Plain Diff
[hbase10] Modifications for HBase 2.0.0-SNAPSHOT
Remove deprecated methods: Put.add -> Put.addColumn. KeyValue -> Cell.
parent
7df83eaa
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
hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
+10
-6
10 additions, 6 deletions
hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
with
10 additions
and
6 deletions
hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
+
10
−
6
View file @
095e9679
...
...
@@ -28,7 +28,6 @@ import org.apache.hadoop.hbase.Cell;
import
org.apache.hadoop.hbase.CellUtil
;
import
org.apache.hadoop.hbase.HBaseConfiguration
;
import
org.apache.hadoop.hbase.HTableDescriptor
;
import
org.apache.hadoop.hbase.KeyValue
;
import
org.apache.hadoop.hbase.TableName
;
import
org.apache.hadoop.hbase.client.BufferedMutator
;
import
org.apache.hadoop.hbase.client.BufferedMutatorParams
;
...
...
@@ -250,7 +249,9 @@ public class HBaseClient10 extends com.yahoo.ycsb.DB
if
(
r
.
isEmpty
())
{
return
NoMatchingRecord
;
}
for
(
Cell
c
:
r
.
listCells
())
{
while
(
r
.
advance
())
{
final
Cell
c
=
r
.
current
();
result
.
put
(
Bytes
.
toString
(
CellUtil
.
cloneQualifier
(
c
)),
new
ByteArrayByteIterator
(
CellUtil
.
cloneValue
(
c
)));
if
(
_debug
)
{
...
...
@@ -316,6 +317,7 @@ public class HBaseClient10 extends com.yahoo.ycsb.DB
{
//get row key
String
key
=
Bytes
.
toString
(
rr
.
getRow
());
if
(
_debug
)
{
System
.
out
.
println
(
"Got scan result for key: "
+
key
);
...
...
@@ -323,11 +325,13 @@ public class HBaseClient10 extends com.yahoo.ycsb.DB
HashMap
<
String
,
ByteIterator
>
rowResult
=
new
HashMap
<
String
,
ByteIterator
>();
for
(
KeyValue
kv
:
rr
.
raw
())
{
while
(
rr
.
advance
())
{
final
Cell
cell
=
rr
.
current
();
rowResult
.
put
(
Bytes
.
toString
(
kv
.
get
Qualifier
()),
new
ByteArrayByteIterator
(
kv
.
get
Value
()));
Bytes
.
toString
(
CellUtil
.
clone
Qualifier
(
cell
)),
new
ByteArrayByteIterator
(
CellUtil
.
clone
Value
(
cell
)));
}
//add rowResult to result vector
result
.
add
(
rowResult
);
numResults
++;
...
...
@@ -397,7 +401,7 @@ public class HBaseClient10 extends com.yahoo.ycsb.DB
System
.
out
.
println
(
"Adding field/value "
+
entry
.
getKey
()
+
"/"
+
Bytes
.
toStringBinary
(
value
)
+
" to put request"
);
}
p
.
add
(
_columnFamilyBytes
,
Bytes
.
toBytes
(
entry
.
getKey
()),
value
);
p
.
add
Column
(
_columnFamilyBytes
,
Bytes
.
toBytes
(
entry
.
getKey
()),
value
);
}
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