public Properties getConnectionProperties() { DataStore ds = getDataStore(); Properties properties = new Properties(); if (ds != null) { if (ds.getConnection() != null) { properties = ds.getConnection().getProperties(); return properties != null ? properties : new Properties(); } if (log.isWarnEnabled()) { log.warn("No connection properties found, returning none."); } } return properties; }
public Properties getConnectionProperties() { DataStore ds = getDataStore(dataStoreName); Properties properties = new Properties(); if (ds != null) { if (ds.getConnection() != null) { properties = ds.getConnection().getProperties(); return properties != null ? properties : new Properties(); } if (logger.isWarnEnabled()) { logger.warn("No connection properties found, returning none."); } } return properties; }
public String getCqlVersion() { DataStore dataStore = getDataStore(dataStoreName); if (dataStore != null) { Properties properties = dataStore.getConnection() != null ? dataStore.getConnection().getProperties() : null; if (properties != null) { String cqlVersion = properties.getProperty(CassandraConstants.CQL_VERSION); if (cqlVersion != null) { if (cqlVersion.equalsIgnoreCase(CassandraConstants.CQL_VERSION_3_0) || cqlVersion.equalsIgnoreCase(CassandraConstants.CQL_VERSION_2_0)) { return cqlVersion; } else { logger.warn("Invalid {} cql version provided, valid are {},{}.", cqlVersion, CassandraConstants.CQL_VERSION_2_0, CassandraConstants.CQL_VERSION_3_0); } } } } return CassandraConstants.CQL_VERSION_2_0; }
List<Server> servers = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection() .getServers() : null; if (servers != null && !servers.isEmpty()) propsFromCp = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection() .getProperties() : null;
.getConnection() : null; if (conn != null && conn.getProperties() != null)
Properties properties = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection() .getProperties() : null;
Assert.assertNotNull(store.getConnection()); Assert.assertNotNull(store.getConnection().getProperties()); Assert.assertNull(store.getConnection().getServers()); Assert.assertEquals(2, store.getConnection().getProperties().size()); Assert.assertNotNull(store.getConnection()); Assert.assertNotNull(store.getConnection().getProperties()); Assert.assertEquals(2, store.getConnection().getProperties().size()); Assert.assertNotNull(store.getConnection().getServers()); Assert.assertEquals(2, store.getConnection().getServers().size());
.getConnection() : null; if (conn != null && conn.getProperties() != null)
hadoopConf.set("hbase.master", host + ":" + port); conn = HBasePropertyReader.hsmd.getDataStore() != null ? HBasePropertyReader.hsmd.getDataStore() .getConnection() : null; if (conn != null && conn.getProperties() != null)
Properties properties = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection() .getProperties() : null;
hadoopConf.set("hbase.master", host + ":" + port); conn = HBasePropertyReader.hsmd.getDataStore() != null ? HBasePropertyReader.hsmd.getDataStore() .getConnection() : null; if (conn != null && conn.getProperties() != null)
List<Server> servers = dataStore != null && dataStore.getConnection() != null ? dataStore.getConnection() .getServers() : null; Connection conn = dataStore.getConnection();
/** * Gets the zookeeper host. * * @return the zookeeper host */ public String getZookeeperHost() { DataStore ds = getDataStore(); if (ds != null && ds.getConnection() != null) { Connection conn = ds.getConnection(); if (conn.getProperties() != null && !conn.getProperties().isEmpty()) { zookeeperHost = conn.getProperties().getProperty(HBaseConstants.ZOOKEEPER_HOST.trim()); } } return zookeeperHost; }
/** * Gets the zookeeper port. * * @return the zookeeper port */ public String getZookeeperPort() { DataStore ds = getDataStore(); if (ds != null && ds.getConnection() != null) { Connection conn = ds.getConnection(); if (conn.getProperties() != null && !conn.getProperties().isEmpty()) { zookeeperPort = conn.getProperties().getProperty(HBaseConstants.ZOOKEEPER_PORT).trim(); } } return zookeeperPort; }
/** * @return the zookeeper_port */ public String getZookeeperPort() { DataStore ds = getDataStore(); if (ds != null && ds.getConnection() != null) { Connection conn = ds.getConnection(); if (conn.getProperties() != null && !conn.getProperties().isEmpty()) { zookeeperPort = conn.getProperties().getProperty(HBaseConstants.ZOOKEEPER_PORT).trim(); } } return zookeeperPort; }
private HashMap<String, String> initializeProperties() { if (clientProperties != null && clientProperties.getDatastores() != null) { for (DataStore dataStore : clientProperties.getDatastores()) { if (dataStore.getName() != null && dataStore.getName().trim().equalsIgnoreCase("redis")) { return new HashMap(dataStore.getConnection().getProperties()); } } } return null; }
public Properties getConnectionProperties() { DataStore ds = getDataStore("elasticsearch"); if (ds != null) { Connection connection = ds.getConnection(); if (connection != null) { Properties properties = connection.getProperties(); return properties; } } return null; } }
/** * @return the zookeeper_host */ public String getZookeeperHost() { DataStore ds = getDataStore(); if (ds != null && ds.getConnection() != null) { Connection conn = ds.getConnection(); if (conn.getProperties() != null && !conn.getProperties().isEmpty()) { zookeeperHost = conn.getProperties().getProperty(HBaseConstants.ZOOKEEPER_HOST.trim()); } } return zookeeperHost; }
public List<Server> getConnectionServers() { DataStore ds = getDataStore(); List<Server> servers = new ArrayList<Server>(); if (ds != null && ds.getConnection() != null) { servers = ds.getConnection().getServers(); return servers; } return servers; } }
public List<Server> getConnectionServers() { DataStore ds = getDataStore(dataStoreName); List<Server> servers = new ArrayList<Server>(); if (ds != null && ds.getConnection() != null) { servers = ds.getConnection().getServers(); return servers; } return servers; }