accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rukshan Chathuranga <rcruksha...@gmail.com>
Subject Re: Error BAD_CREDENTIALS when use TabletLocator.getLocator
Date Wed, 15 Jul 2015 16:55:26 GMT
Hi Russ,

Thanks for the quick response. can you give me sample to create clientConf?

Thanks and Regards.


*Rukshan Chathuranga.*

*Department Of Computer Science & Engineering,*

*Faculty Of Engineering,*
*University Of Moratuwa. **Sri Lanka.*

*WEB: http://www.rukspot.com/ <http://rukspot.com/>*


On Wed, Jul 15, 2015 at 10:10 PM, Russ Weeks <rweeks@newbrightidea.com>
wrote:

> Hi, Rukshan,
>
> Are you sure you want to use an AccumuloServerContext? I think a
> ClientContext might be better:
>
> ClientConfiguration clientConf = [...wherever your client configuration
> comes from]
> Instance accInstance = [... your ZooKeeperInstance]
> ClientContext ctx = new ClientContext(accInstance, new
> Credentials(username, new PasswordToken(password), clientConf);
> TabletLocator tl = TabletLocator.getLocator(ctx, new Text(tableId)); //
> NOT table name!
>
> Note that TabletLocator, CientContext, Credentals and KeyExtent are not
> part of the public API.
>
> -Russ
>
> On Wed, Jul 15, 2015 at 9:31 AM Rukshan Chathuranga <rcrukshan17@gmail.com>
> wrote:
>
>> Hi,
>>
>> i used following code sample,
>>
>> AccumuloServerContext context = new AccumuloServerContext( new
>> ServerConfigurationFactory(conn.getInstance()));
>> TabletLocator.getLocator(context, tableId).locateTablet(context,row,
>> false, false);
>>
>> But it give error as follow.
>>
>> org.apache.accumulo.core.client.AccumuloSecurityException: Error
>> BAD_CREDENTIALS for user !SYSTEM - Username or Password is Invalid
>> at
>> org.apache.accumulo.core.client.impl.ThriftScanner.getBatchFromServer(ThriftScanner.java:121)
>> at
>> org.apache.accumulo.core.metadata.MetadataLocationObtainer.lookupTablet(MetadataLocationObtainer.java:95)
>> at
>> org.apache.accumulo.core.client.impl.TabletLocatorImpl.lookupTabletLocation(TabletLocatorImpl.java:463)
>> at
>> org.apache.accumulo.core.client.impl.TabletLocatorImpl.lookupTabletLocationAndCheckLock(TabletLocatorImpl.java:634)
>> at
>> org.apache.accumulo.core.client.impl.TabletLocatorImpl._locateTablet(TabletLocatorImpl.java:620)
>> at
>> org.apache.accumulo.core.client.impl.TabletLocatorImpl.locateTablet(TabletLocatorImpl.java:439)
>> at
>> mil.nga.giat.geowave.service.healthimpl.GeospatialExtent.getSplits(GeospatialExtent.java:112)
>> at
>> mil.nga.giat.geowave.service.healthimpl.GeospatialExtent.main(GeospatialExtent.java:42)
>> Caused by: ThriftSecurityException(user:!SYSTEM, code:BAD_CREDENTIALS)
>> at
>> org.apache.accumulo.core.tabletserver.thrift.TabletClientService$startScan_result$startScan_resultStandardScheme.read(TabletClientService.java:6696)
>> at
>> org.apache.accumulo.core.tabletserver.thrift.TabletClientService$startScan_result$startScan_resultStandardScheme.read(TabletClientService.java:6673)
>> at
>> org.apache.accumulo.core.tabletserver.thrift.TabletClientService$startScan_result.read(TabletClientService.java:6596)
>> at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
>> at
>> org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.recv_startScan(TabletClientService.java:232)
>> at
>> org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Client.startScan(TabletClientService.java:208)
>> at
>> org.apache.accumulo.core.client.impl.ThriftScanner.getBatchFromServer(ThriftScanner.java:98)
>> ... 7 more
>>
>>
>> Does any one know how to fix this?
>>
>> Thanks and Regards.
>>
>> *Rukshan Chathuranga.*
>>
>> *Department Of Computer Science & Engineering,*
>>
>> *Faculty Of Engineering,*
>> *University Of Moratuwa. **Sri Lanka.*
>>
>> *WEB: http://www.rukspot.com/ <http://rukspot.com/>*
>>
>>

Mime
View raw message