Search in sources :

Example 1 with ClientInfoImpl

use of org.apache.accumulo.core.clientImpl.ClientInfoImpl in project accumulo by apache.

the class ZooKeeperInstance method getConnector.

@Override
public Connector getConnector(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException {
    Properties properties = ClientConfConverter.toProperties(clientConf);
    properties.setProperty(ClientProperty.AUTH_PRINCIPAL.getKey(), principal);
    properties.setProperty(ClientProperty.INSTANCE_NAME.getKey(), getInstanceName());
    ClientInfo info = new ClientInfoImpl(properties, token);
    AccumuloConfiguration serverConf = ClientConfConverter.toAccumuloConf(properties);
    return new org.apache.accumulo.core.clientImpl.ConnectorImpl(new ClientContext(SingletonReservation.noop(), info, serverConf));
}
Also used : ClientInfoImpl(org.apache.accumulo.core.clientImpl.ClientInfoImpl) ClientContext(org.apache.accumulo.core.clientImpl.ClientContext) ClientInfo(org.apache.accumulo.core.clientImpl.ClientInfo) Properties(java.util.Properties) AccumuloConfiguration(org.apache.accumulo.core.conf.AccumuloConfiguration)

Aggregations

Properties (java.util.Properties)1 ClientContext (org.apache.accumulo.core.clientImpl.ClientContext)1 ClientInfo (org.apache.accumulo.core.clientImpl.ClientInfo)1 ClientInfoImpl (org.apache.accumulo.core.clientImpl.ClientInfoImpl)1 AccumuloConfiguration (org.apache.accumulo.core.conf.AccumuloConfiguration)1