public ReadOnlyProps asProps() { Map<String, String> connectionProps = Maps.newHashMapWithExpectedSize(3); if (getZookeeperQuorum() != null) { connectionProps.put(QueryServices.ZOOKEEPER_QUORUM_ATTRIB, getZookeeperQuorum()); } if (getPort() != null) { connectionProps.put(QueryServices.ZOOKEEPER_PORT_ATTRIB, getPort().toString()); } if (getRootNode() != null) { connectionProps.put(QueryServices.ZOOKEEPER_ROOT_NODE_ATTRIB, getRootNode()); } if (getPrincipal() != null && getKeytab() != null) { connectionProps.put(QueryServices.HBASE_CLIENT_PRINCIPAL, getPrincipal()); connectionProps.put(QueryServices.HBASE_CLIENT_KEYTAB, getKeytab()); } return connectionProps.isEmpty() ? ReadOnlyProps.EMPTY_PROPS : new ReadOnlyProps( connectionProps.entrySet().iterator()); }
this.userName = connectionInfo.getPrincipal(); this.user = connectionInfo.getUser(); this.latestMetaData = newEmptyMetaData();
public ConnectionlessQueryServicesImpl(QueryServices services, ConnectionInfo connInfo, Properties info) { super(services); userName = connInfo.getPrincipal(); user = connInfo.getUser(); metaData = newEmptyMetaData(); // Use KeyValueBuilder that builds real KeyValues, as our test utils require this this.kvBuilder = GenericKeyValueBuilder.INSTANCE; Configuration config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(); for (Entry<String,String> entry : services.getProps()) { config.set(entry.getKey(), entry.getValue()); } if (info != null) { for (Object key : info.keySet()) { config.set((String) key, info.getProperty((String) key)); } } for (Entry<String,String> entry : connInfo.asProps()) { config.set(entry.getKey(), entry.getValue()); } // Without making a copy of the configuration we cons up, we lose some of our properties // on the server side during testing. this.config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(config); this.guidePostsCache = new GuidePostsCache(this, config); // set replication required parameter ConfigUtil.setReplicationConfigIfAbsent(this.config); this.props = new ReadOnlyProps(this.config.iterator()); }
String rootNode = this.getRootNode(); String keytab = this.getKeytab(); String principal = this.getPrincipal();
String rootNode = this.getRootNode(); String keytab = this.getKeytab(); String principal = this.getPrincipal();
this.userName = connectionInfo.getPrincipal(); this.user = connectionInfo.getUser(); this.latestMetaData = newEmptyMetaData();
this.userName = connectionInfo.getPrincipal(); this.user = connectionInfo.getUser(); this.latestMetaData = newEmptyMetaData();
public ConnectionlessQueryServicesImpl(QueryServices services, ConnectionInfo connInfo, Properties info) { super(services); userName = connInfo.getPrincipal(); user = connInfo.getUser(); metaData = newEmptyMetaData(); // Use KeyValueBuilder that builds real KeyValues, as our test utils require this this.kvBuilder = GenericKeyValueBuilder.INSTANCE; Configuration config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(); for (Entry<String,String> entry : services.getProps()) { config.set(entry.getKey(), entry.getValue()); } if (info != null) { for (Object key : info.keySet()) { config.set((String) key, info.getProperty((String) key)); } } for (Entry<String,String> entry : connInfo.asProps()) { config.set(entry.getKey(), entry.getValue()); } // Without making a copy of the configuration we cons up, we lose some of our properties // on the server side during testing. this.config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(config); this.guidePostsCache = new GuidePostsCache(this, config); // set replication required parameter ConfigUtil.setReplicationConfigIfAbsent(this.config); this.props = new ReadOnlyProps(this.config.iterator()); }
public ConnectionlessQueryServicesImpl(QueryServices services, ConnectionInfo connInfo, Properties info) { super(services); userName = connInfo.getPrincipal(); user = connInfo.getUser(); metaData = newEmptyMetaData(); // Use KeyValueBuilder that builds real KeyValues, as our test utils require this this.kvBuilder = GenericKeyValueBuilder.INSTANCE; Configuration config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(); for (Entry<String,String> entry : services.getProps()) { config.set(entry.getKey(), entry.getValue()); } if (info != null) { for (Object key : info.keySet()) { config.set((String) key, info.getProperty((String) key)); } } for (Entry<String,String> entry : connInfo.asProps()) { config.set(entry.getKey(), entry.getValue()); } // Without making a copy of the configuration we cons up, we lose some of our properties // on the server side during testing. this.config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(config); this.guidePostsCache = new GuidePostsCache(this, config); // set replication required parameter ConfigUtil.setReplicationConfigIfAbsent(this.config); this.props = new ReadOnlyProps(this.config.iterator()); }
public ReadOnlyProps asProps() { Map<String, String> connectionProps = Maps.newHashMapWithExpectedSize(3); if (getZookeeperQuorum() != null) { connectionProps.put(QueryServices.ZOOKEEPER_QUORUM_ATTRIB, getZookeeperQuorum()); } if (getPort() != null) { connectionProps.put(QueryServices.ZOOKEEPER_PORT_ATTRIB, getPort().toString()); } if (getRootNode() != null) { connectionProps.put(QueryServices.ZOOKEEPER_ROOT_NODE_ATTRIB, getRootNode()); } if (getPrincipal() != null && getKeytab() != null) { connectionProps.put(QueryServices.HBASE_CLIENT_PRINCIPAL, getPrincipal()); connectionProps.put(QueryServices.HBASE_CLIENT_KEYTAB, getKeytab()); } return connectionProps.isEmpty() ? ReadOnlyProps.EMPTY_PROPS : new ReadOnlyProps( connectionProps.entrySet().iterator()); }
public ReadOnlyProps asProps() { Map<String, String> connectionProps = Maps.newHashMapWithExpectedSize(3); if (getZookeeperQuorum() != null) { connectionProps.put(QueryServices.ZOOKEEPER_QUORUM_ATTRIB, getZookeeperQuorum()); } if (getPort() != null) { connectionProps.put(QueryServices.ZOOKEEPER_PORT_ATTRIB, getPort().toString()); } if (getRootNode() != null) { connectionProps.put(QueryServices.ZOOKEEPER_ROOT_NODE_ATTRIB, getRootNode()); } if (getPrincipal() != null && getKeytab() != null) { connectionProps.put(QueryServices.HBASE_CLIENT_PRINCIPAL, getPrincipal()); connectionProps.put(QueryServices.HBASE_CLIENT_KEYTAB, getKeytab()); } return connectionProps.isEmpty() ? ReadOnlyProps.EMPTY_PROPS : new ReadOnlyProps( connectionProps.entrySet().iterator()); }
String rootNode = this.getRootNode(); String keytab = this.getKeytab(); String principal = this.getPrincipal();