/** * Get the Accumulo password from the configuration object that is meant to * be used when connecting a {@link Connector} to Accumulo. * * @param conf - The configuration object that will be interrogated. (not null) * @return The password if one could be found; otherwise an empty string. */ public static String getPassword(final Configuration conf) { return new AccumuloRdfConfiguration(conf).getPassword(); }
/** * Get a comma delimited list of the names of the Zookeeper servers from * the configuration object that is meant to be used when connecting a * {@link Connector} to Accumulo. * * @return The zookeepers list if one could be found; otherwise {@code null}. */ public String getAccumuloZookeepers() { return get(CLOUDBASE_ZOOKEEPERS); }
/** * Indicates that a Mock instance of Accumulo is being used to back the Rya instance. * * @return {@code true} if the Rya instance is backed by a mock Accumulo; otherwise {@code false}. */ public boolean getUseMockAccumulo() { return getBoolean(USE_MOCK_INSTANCE, false); }
/** * Indicates that a Mock instance of Accumulo is being used to back the Rya instance. * * @param conf - The configuration object that will be interrogated. (not null) * @return {@code true} if the Rya instance is backed by a mock Accumulo; otherwise {@code false}. */ public static boolean useMockInstance(final Configuration conf) { return new AccumuloRdfConfiguration(conf).useMockInstance(); }
/** * Get the Accumulo username from the configuration object that is meant to * be used when connecting a {@link Connector} to Accumulo. * * @param conf - The configuration object that will be interrogated. (not null) * @return The username if one could be found; otherwise {@code null}. */ public static String getUsername(final Configuration conf) { return new AccumuloRdfConfiguration(conf).getUsername(); }
/** * Creates a new instance of {@link AccumuloParentMetadataRepository}. * @param accumuloRyaDao the {@link AccumuloRyaDAO}. (not {@code null}) */ public AccumuloParentMetadataRepository(final AccumuloRyaDAO accumuloRyaDao) { this.accumuloRyaDao = checkNotNull(accumuloRyaDao); connector = accumuloRyaDao.getConnector(); tablePrefix = accumuloRyaDao.getConf().getTablePrefix(); mergeParentMetadataTableName = tablePrefix + BASE_MERGE_METADATA_TABLE_NAME; }
/** * Tells the Rya instance to use a Mock instance of Accumulo as its backing. * */ public void setUseMockAccumulo(boolean useMock) { setBoolean(USE_MOCK_INSTANCE, useMock); }
@Override public Namespace next() throws RdfDAOException { if (hasNext()) { return getNamespace(result); } return null; }
/** * Specifies whether to use prefix hashing as a table design optimization to * prevent hot spotting. The default value is false. * * @param useHash * - use prefix hashing to prevent hot spotting * @return specified builder for chaining method invocations */ public B setUseAccumuloPrefixHashing(boolean useHash) { this.usePrefixHashing = useHash; return confBuilder(); }
@Override public double getCardinality(final AccumuloRdfConfiguration conf, final RdfEvalStatsDAO.CARDINALITY_OF card, final List<Value> val) throws RdfDAOException { return getCardinality(conf, card, val, null); } }
/** * Indicates that a Mock instance of Accumulo is being used to back the Rya instance. * * @param conf - The configuration object that will be interrogated. (not null) * @return {@code true} if the Rya instance is backed by a mock Accumulo; otherwise {@code false}. */ public static boolean useMockInstance(final Configuration conf) { return new AccumuloRdfConfiguration(conf).useMockInstance(); }
/** * Get the Accumulo username from the configuration object that is meant to * be used when connecting a {@link Connector} to Accumulo. * * @return The username if one could be found; otherwise {@code null}. */ public String getAccumuloUser(){ return get(CLOUDBASE_USER); }
/** * Sets Accumulo user. This is a required parameter to connect to an * Accumulo Rya Instance * * @param user * - Accumulo user */ public B setAccumuloUser(String user) { this.user = user; return confBuilder(); }
/** * Get the Accumulo password from the configuration object that is meant to * be used when connecting a {@link Connector} to Accumulo. * * @return The password if one could be found; otherwise an empty string. */ public String getAccumuloPassword() { return get(CLOUDBASE_PASSWORD); }
/** * Sets name of Accumulo instance containing Rya tables. This is a required * parameter to connect to an Accumulo Rya instance. * * @param instance * - Accumulo instance name * @return specified builder for chaining method invocations */ public B setAccumuloInstance(String instance) { this.instance = instance; return confBuilder(); }
/** * Get the Accumulo instance name from the configuration object that is * meant to be used when connecting a {@link Connector} to Accumulo. * * @return The instance name if one could be found; otherwise {@code null}. */ public String getAccumuloInstance() { return get(CLOUDBASE_INSTANCE); }
/** * Specifies whether to use prefix hashing as a table design optimization to * prevent hot spotting. The default value is false. * * @param useHash * - use prefix hashing to prevent hot spotting * @return specified builder for chaining method invocations */ public B setUseAccumuloPrefixHashing(boolean useHash) { this.usePrefixHashing = useHash; return confBuilder(); }
/** * Get the Accumulo username from the configuration object that is meant to * be used when connecting a {@link Connector} to Accumulo. * * @return The username if one could be found; otherwise {@code null}. */ public String getAccumuloUser(){ return get(CLOUDBASE_USER); }
/** * Get a comma delimited list of the names of the Zookeeper servers from * the configuration object that is meant to be used when connecting a * {@link Connector} to Accumulo. * * @return The zookeepers list if one could be found; otherwise {@code null}. */ public String getAccumuloZookeepers() { return get(CLOUDBASE_ZOOKEEPERS); }
/** * Get the Accumulo instance name from the configuration object that is * meant to be used when connecting a {@link Connector} to Accumulo. * * @return The instance name if one could be found; otherwise {@code null}. */ public String getAccumuloInstance() { return get(CLOUDBASE_INSTANCE); }