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
6cd94e88
Commit
6cd94e88
authored
9 years ago
by
Biju Nair
Browse files
Options
Downloads
Patches
Plain Diff
[hbase10] changes to be able to work with secured hbase cluster
parent
025f3b4e
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
hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
+17
-0
17 additions, 0 deletions
hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
with
17 additions
and
0 deletions
hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java
+
17
−
0
View file @
6cd94e88
...
...
@@ -24,6 +24,7 @@ import com.yahoo.ycsb.DBException;
import
com.yahoo.ycsb.Status
;
import
com.yahoo.ycsb.measurements.Measurements
;
import
org.apache.hadoop.security.UserGroupInformation
;
import
org.apache.hadoop.conf.Configuration
;
import
org.apache.hadoop.hbase.Cell
;
import
org.apache.hadoop.hbase.CellUtil
;
...
...
@@ -112,6 +113,22 @@ public class HBaseClient10 extends com.yahoo.ycsb.DB {
Durability
.
valueOf
(
getProperties
().
getProperty
(
"durability"
));
}
if
(
"kerberos"
.
equalsIgnoreCase
(
config
.
get
(
"hbase.security.authentication"
)))
{
config
.
set
(
"hadoop.security.authentication"
,
"Kerberos"
);
UserGroupInformation
.
setConfiguration
(
config
);
}
if
((
getProperties
().
getProperty
(
"principal"
)!=
null
)
&&
(
getProperties
().
getProperty
(
"keytab"
)!=
null
))
{
try
{
UserGroupInformation
.
loginUserFromKeytab
(
getProperties
().
getProperty
(
"principal"
),
getProperties
().
getProperty
(
"keytab"
));
}
catch
(
IOException
e
)
{
System
.
err
.
println
(
"Keytab file is not readable or not found"
);
throw
new
DBException
(
e
);
}
}
try
{
connection
=
ConnectionFactory
.
createConnection
(
config
);
}
catch
(
java
.
io
.
IOException
e
)
{
...
...
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