public AccumuloRdfConfiguration toRdfConfiguation() { final AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration(); return conf; }
@Override public AccumuloRdfConfiguration clone() { return new AccumuloRdfConfiguration(this); }
/** * 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 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(); }
/** * 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(); }
/** * Instantiates a RyaStatementWritable with the default RyaTripleContext. */ public RyaStatementWritable() { this.ryaContext = RyaTripleContext.getInstance(new AccumuloRdfConfiguration()); } /**
/** * 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(); }
public StatementPatternStorage() { if (super.conf != null){ ryaContext = RyaTripleContext.getInstance(new AccumuloRdfConfiguration(super.conf)); } else { ryaContext = RyaTripleContext.getInstance(new AccumuloRdfConfiguration()); } }
/** * 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(); }
/** * Instantiates a RyaStatementWritable with the default RyaTripleContext. */ public RyaStatementWritable() { this.ryaContext = RyaTripleContext.getInstance(new AccumuloRdfConfiguration()); } /**
/** * 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(); }
/** * Create an Accumulo {@link Connector} using the configured connection information. * If the connection information points to a mock instance of Accumulo, then the * {@link #USE_MOCK_INSTANCE} flag must be set. * * @param conf - Configures how the connector will be built. (not null) * @return A {@link Connector} that may be used to interact with the configured Accumulo instance. * @throws AccumuloException The connector couldn't be created because of an Accumulo problem. * @throws AccumuloSecurityException The connector couldn't be created because of an Accumulo security violation. */ public static Connector getConnector(final Configuration conf) throws AccumuloException, AccumuloSecurityException { return ConnectorFactory.connect( new AccumuloRdfConfiguration(conf) ); }
@Override public void setup(Context context) throws IOException, InterruptedException { super.setup(context); ryaContext = RyaTripleContext.getInstance(new AccumuloRdfConfiguration(context.getConfiguration())); }
public RdfCloudTripleStoreConfiguration getConfiguration() { RdfCloudTripleStoreConfiguration conf = new AccumuloRdfConfiguration(); if (properties != null) { for (Map.Entry<String, String> prop : properties.entrySet()) { conf.set(prop.getKey(), prop.getValue()); } conf.setTablePrefix(conf.getTablePrefix()); } return conf; }
/** * Initializes the RecordReader. * @param inSplit Defines the portion of data to read. * @param attempt Context for this task attempt. * @throws IOException if thrown by the superclass's initialize method. */ @Override public void initialize(InputSplit inSplit, TaskAttemptContext attempt) throws IOException { super.initialize(inSplit, attempt); this.tableLayout = MRUtils.getTableLayout(attempt.getConfiguration(), TABLE_LAYOUT.OSP); //TODO verify that this is correct this.ryaContext = RyaTripleContext.getInstance(new AccumuloRdfConfiguration(attempt.getConfiguration())); }
@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context); final Configuration conf = context.getConfiguration(); tableLayout = RdfCloudTripleStoreConstants.TABLE_LAYOUT.valueOf( conf.get(MRUtils.TABLE_LAYOUT_PROP, RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP.toString())); ryaContext = RyaTripleContext.getInstance(new AccumuloRdfConfiguration(conf)); }
@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context); final Configuration conf = context.getConfiguration(); tableLayout = RdfCloudTripleStoreConstants.TABLE_LAYOUT.valueOf( conf.get(MRUtils.TABLE_LAYOUT_PROP, RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP.toString())); ryaContext = RyaTripleContext.getInstance(new AccumuloRdfConfiguration(conf)); }
private RdfCloudTripleStoreConnection getRyaSailConnection() throws AccumuloException, AccumuloSecurityException, SailException { RdfCloudTripleStore store = new RdfCloudTripleStore(); AccumuloRyaDAO crdfdao = new AccumuloRyaDAO(); crdfdao.setConnector(accCon); AccumuloRdfConfiguration acc = new AccumuloRdfConfiguration(conf); crdfdao.setConf(acc); store.setRyaDAO(crdfdao); store.initialize(); return (RdfCloudTripleStoreConnection) store.getConnection(); }
private RdfCloudTripleStoreConnection getRyaSailConnection() throws AccumuloException, AccumuloSecurityException, SailException { RdfCloudTripleStore store = new RdfCloudTripleStore(); AccumuloRyaDAO crdfdao = new AccumuloRyaDAO(); crdfdao.setConnector(accCon); AccumuloRdfConfiguration acc = new AccumuloRdfConfiguration(conf); crdfdao.setConf(acc); store.setRyaDAO(crdfdao); store.initialize(); return (RdfCloudTripleStoreConnection) store.getConnection(); }
private AccumuloRdfConfiguration makeConfig() { final AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration(); conf.setTablePrefix(getRyaInstanceName()); // Accumulo connection information. conf.set(ConfigUtils.CLOUDBASE_USER, getUsername()); conf.set(ConfigUtils.CLOUDBASE_PASSWORD, getPassword()); conf.set(ConfigUtils.CLOUDBASE_INSTANCE, super.getMiniAccumuloCluster().getInstanceName()); conf.set(ConfigUtils.CLOUDBASE_ZOOKEEPERS, super.getMiniAccumuloCluster().getZooKeepers()); conf.set(RdfCloudTripleStoreConfiguration.CONF_QUERY_AUTH, "U,V,W"); return conf; }