Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specified users #44

Closed
wanderself opened this issue Apr 14, 2017 · 1 comment
Closed

specified users #44

wanderself opened this issue Apr 14, 2017 · 1 comment

Comments

@wanderself
Copy link

hey guys? this project's default user is root, I notice that its defind in type client struct{}, and this is a private struct, so how can we specified user of hbase?

i donot have root permision so i have these exceptions

time="2017-04-12T09:42:46+08:00" level=error msg="failed looking up region" backoff=13m23.192s err="deadline exceeded" key=1 table="GRIH:TEST" 
time="2017-04-12T09:56:29+08:00" level=info msg="added new region client" client=RegionClient{Host: Slave01, Port: 60020} 
time="2017-04-12T09:56:29+08:00" level=info msg="added new region" overlaps=[] region=RegionInfo{Name: GRIH:TEST,,1491892060219.ff2bf261855ebdd27e70e26a5cee6a81., ID: 1491892060219, Namespace: GRIH, Table: TEST, StartKey: , StopKey: } replaced=true 
time="2017-04-12T11:39:21+08:00" level=info msg="added new region client" client=RegionClient{Host: Slave09, Port: 60020} 
2017/04/12 11:39:21 HBase Java exception org.apache.hadoop.hbase.security.AccessDeniedException: 
org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions (user=root, scope=GRIH:TEST, family=colFam:age, params=[table=GRIH:TEST,family=colFam:age],action=WRITE)
	at org.apache.hadoop.hbase.security.access.AccessController.prePut(AccessController.java:1650)
	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$30.call(RegionCoprocessorHost.java:918)
	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1673)
	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1749)
	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1705)
	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.prePut(RegionCoprocessorHost.java:914)
	at org.apache.hadoop.hbase.regionserver.HRegion.doPreMutationHook(HRegion.java:2896)
	at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2871)
	at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2817)
	at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2821)
	at org.apache.hadoop.hbase.regionserver.HRegion.doBatchMutate(HRegion.java:3548)
	at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:2694)
	at org.apache.hadoop.hbase.regionserver.RSRpcServices.mutate(RSRpcServices.java:2256)
	at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:33646)
	at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2185)
	at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:109)
	at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
	at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
	at java.lang.Thread.run(Thread.java:745)
@timoha
Copy link
Collaborator

timoha commented Apr 14, 2017

you can pass this option when creating a Client: https://godoc.org/github.com/tsuna/gohbase#EffectiveUser.

Hope this resolves it, gonna close the issue.

@timoha timoha closed this as completed Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants