@SuppressWarnings("deprecation") @Test(timeout = 60000) public void testPerTableClasspath() throws Exception { org.apache.accumulo.core.client.Connector conn = accumulo.getConnector("root", "superSecret"); conn.tableOperations().create("table2"); File jarFile = folder.newFile("iterator.jar"); FileUtils.copyURLToFile(this.getClass().getResource("/FooFilter.jar"), jarFile); conn.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1", jarFile.toURI().toString()); conn.tableOperations().setProperty("table2", Property.TABLE_CLASSPATH.getKey(), "cx1"); conn.tableOperations().attachIterator("table2", new IteratorSetting(100, "foocensor", "org.apache.accumulo.test.FooFilter")); BatchWriter bw = conn.createBatchWriter("table2", new BatchWriterConfig()); Mutation m1 = new Mutation("foo"); m1.put("cf1", "cq1", "v2"); m1.put("cf1", "cq2", "v3"); bw.addMutation(m1); Mutation m2 = new Mutation("bar"); m2.put("cf1", "cq1", "v6"); m2.put("cf1", "cq2", "v7"); bw.addMutation(m2); bw.close(); Scanner scanner = conn.createScanner("table2", new Authorizations()); int count = 0; for (Entry<Key,Value> entry : scanner) { assertFalse(entry.getKey().getRowData().toString().toLowerCase().contains("foo")); count++; } assertEquals(2, count); conn.instanceOperations() .removeProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1"); conn.tableOperations().delete("table2"); }
@Deprecated(since = "2.0.0") public org.apache.accumulo.core.client.Connector getConnector(String user, String passwd) throws AccumuloException, AccumuloSecurityException { return org.apache.accumulo.core.client.Connector .from(impl.createAccumuloClient(user, new PasswordToken(passwd))); }
MiniAccumuloCluster { @Deprecated(since = "2.0.0") public org.apache.accumulo.core.client.Connector getConnector(String user, String passwd) throws AccumuloException, AccumuloSecurityException { return org.apache.accumulo.core.client.Connector .from(impl.createAccumuloClient(user, new PasswordToken(passwd))); } }
MiniAccumuloCluster { @Deprecated(since = "2.0.0") public org.apache.accumulo.core.client.Connector getConnector(String user, String passwd) throws AccumuloException, AccumuloSecurityException { return org.apache.accumulo.core.client.Connector .from(impl.createAccumuloClient(user, new PasswordToken(passwd))); } private  MiniAccumuloCluster(MiniAccumuloConfigImpl config);  MiniAccumuloCluster(File dir, String rootPassword);  MiniAccumuloCluster(MiniAccumuloConfig config); }
MiniAccumuloCluster { @Deprecated(since = "2.0.0") public org.apache.accumulo.core.client.Connector getConnector(String user, String passwd) throws AccumuloException, AccumuloSecurityException { return org.apache.accumulo.core.client.Connector .from(impl.createAccumuloClient(user, new PasswordToken(passwd))); } private  MiniAccumuloCluster(MiniAccumuloConfigImpl config);  MiniAccumuloCluster(File dir, String rootPassword);  MiniAccumuloCluster(MiniAccumuloConfig config); void start(); Set<Pair<ServerType,Integer>> getDebugPorts(); String getInstanceName(); String getZooKeepers(); void stop(); MiniAccumuloConfig getConfig(); @Deprecated(since = "2.0.0") org.apache.accumulo.core.client.Connector getConnector(String user, String passwd); AccumuloClient createAccumuloClient(String user, AuthenticationToken token); @Deprecated(since = "2.0.0") org.apache.accumulo.core.client.ClientConfiguration getClientConfig(); Properties getClientProperties(); static Properties getClientProperties(File directory); }
MiniAccumuloCluster { @Deprecated(since = "2.0.0") public org.apache.accumulo.core.client.Connector getConnector(String user, String passwd) throws AccumuloException, AccumuloSecurityException { return org.apache.accumulo.core.client.Connector .from(impl.createAccumuloClient(user, new PasswordToken(passwd))); } private  MiniAccumuloCluster(MiniAccumuloConfigImpl config);  MiniAccumuloCluster(File dir, String rootPassword);  MiniAccumuloCluster(MiniAccumuloConfig config); void start(); Set<Pair<ServerType,Integer>> getDebugPorts(); String getInstanceName(); String getZooKeepers(); void stop(); MiniAccumuloConfig getConfig(); @Deprecated(since = "2.0.0") org.apache.accumulo.core.client.Connector getConnector(String user, String passwd); AccumuloClient createAccumuloClient(String user, AuthenticationToken token); @Deprecated(since = "2.0.0") org.apache.accumulo.core.client.ClientConfiguration getClientConfig(); Properties getClientProperties(); static Properties getClientProperties(File directory);  }