You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/09/19 21:00:46 UTC
[1/7] git commit: ACCUMULO-3150 Set 0 for monitor log4j port config
value
Repository: accumulo
Updated Branches:
refs/heads/1.5.3-SNAPSHOT 6719c3767 -> 52d30c7be
refs/heads/1.6.1-SNAPSHOT 3c6876d14 -> fbcf2f563
refs/heads/master 9812ee35d -> 0a4218812
ACCUMULO-3150 Set 0 for monitor log4j port config value
The rest of the code is already in place to support
a randomly chosen port for the log4j forwarding to
the monitor. We just need to configure MAC to do this.
Added a test to ensure that ports we want to have
a value of '0' are in fact configured as such.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/72fd6bec
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/72fd6bec
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/72fd6bec
Branch: refs/heads/1.5.3-SNAPSHOT
Commit: 72fd6beccd093d544a880c4564917039b80ee23a
Parents: c170f01
Author: Josh Elser <el...@apache.org>
Authored: Fri Sep 19 13:27:54 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Sep 19 13:28:24 2014 -0400
----------------------------------------------------------------------
.../minicluster/MiniAccumuloCluster.java | 1 +
.../minicluster/MiniAccumuloClusterTest.java | 99 +++++++++++---------
2 files changed, 58 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/72fd6bec/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
index 8246c51..c9aa1f1 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
@@ -270,6 +270,7 @@ public class MiniAccumuloCluster {
mergePropWithRandomPort(siteConfig, Property.TSERV_CLIENTPORT.getKey());
mergePropWithRandomPort(siteConfig, Property.MONITOR_PORT.getKey());
mergePropWithRandomPort(siteConfig, Property.GC_PORT.getKey());
+ mergePropWithRandomPort(siteConfig, Property.MONITOR_LOG4J_PORT.getKey());
// since there is a small amount of memory, check more frequently for majc... setting may not be needed in 1.5
appendProp(fileWriter, Property.TSERV_MAJC_DELAY, "3", siteConfig);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/72fd6bec/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
----------------------------------------------------------------------
diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
index 1b46591..d1d64aa 100644
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
@@ -38,6 +38,7 @@ import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.ColumnVisibility;
import org.apache.accumulo.core.security.TablePermission;
import org.apache.commons.io.FileUtils;
+import org.apache.hadoop.conf.Configuration;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -45,61 +46,61 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
public class MiniAccumuloClusterTest {
-
+
public static TemporaryFolder folder = new TemporaryFolder();
-
+
private static MiniAccumuloCluster accumulo;
-
+
@BeforeClass
public static void setupMiniCluster() throws Exception {
-
+
folder.create();
-
+
accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
-
+
accumulo.start();
-
+
}
-
+
@Test(timeout = 30000)
public void test() throws Exception {
Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", new PasswordToken("superSecret"));
-
+
conn.tableOperations().create("table1");
-
+
conn.securityOperations().createLocalUser("user1", new PasswordToken("pass1"));
conn.securityOperations().changeUserAuthorizations("user1", new Authorizations("A", "B"));
conn.securityOperations().grantTablePermission("user1", "table1", TablePermission.WRITE);
conn.securityOperations().grantTablePermission("user1", "table1", TablePermission.READ);
-
+
IteratorSetting is = new IteratorSetting(10, SummingCombiner.class);
SummingCombiner.setEncodingType(is, LongCombiner.Type.STRING);
SummingCombiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("META", "COUNT")));
-
+
conn.tableOperations().attachIterator("table1", is);
-
+
Connector uconn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("user1", new PasswordToken("pass1"));
-
+
BatchWriter bw = uconn.createBatchWriter("table1", new BatchWriterConfig());
-
+
UUID uuid = UUID.randomUUID();
-
+
Mutation m = new Mutation(uuid.toString());
m.put("META", "SIZE", new ColumnVisibility("A|B"), "8");
m.put("META", "CRC", new ColumnVisibility("A|B"), "456");
m.put("META", "COUNT", new ColumnVisibility("A|B"), "1");
m.put("DATA", "IMG", new ColumnVisibility("A&B"), "ABCDEFGH");
-
+
bw.addMutation(m);
bw.flush();
-
+
m = new Mutation(uuid.toString());
m.put("META", "COUNT", new ColumnVisibility("A|B"), "1");
m.put("META", "CRC", new ColumnVisibility("A|B"), "123");
bw.addMutation(m);
-
+
bw.close();
-
+
int count = 0;
Scanner scanner = uconn.createScanner("table1", new Authorizations("A"));
for (Entry<Key,Value> entry : scanner) {
@@ -114,9 +115,9 @@ public class MiniAccumuloClusterTest {
}
count++;
}
-
+
Assert.assertEquals(3, count);
-
+
count = 0;
scanner = uconn.createScanner("table1", new Authorizations("A", "B"));
for (Entry<Key,Value> entry : scanner) {
@@ -125,62 +126,76 @@ public class MiniAccumuloClusterTest {
}
count++;
}
-
+
Assert.assertEquals(4, count);
-
+
conn.tableOperations().delete("table1");
}
-
+
@Test(timeout = 60000)
public void testPerTableClasspath() throws Exception {
-
+
Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", new PasswordToken("superSecret"));
-
+
conn.tableOperations().create("table2");
-
+
File jarFile = File.createTempFile("iterator", ".jar");
FileUtils.copyURLToFile(this.getClass().getResource("/FooFilter.jar"), jarFile);
jarFile.deleteOnExit();
-
+
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) {
Assert.assertFalse(entry.getKey().getRowData().toString().toLowerCase().contains("foo"));
count++;
}
-
+
Assert.assertEquals(2, count);
-
+
conn.instanceOperations().removeProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1");
conn.tableOperations().delete("table2");
-
+
}
-
+
+ @Test
+ public void testRandomPorts() throws Exception {
+ File confDir = new File(folder.getRoot(), "conf");
+ File accumuloSite = new File(confDir, "accumulo-site.xml");
+ Configuration conf = new Configuration(false);
+ conf.addResource(accumuloSite.toURI().toURL());
+ for (Property randomPortProp : new Property[] {Property.TSERV_CLIENTPORT, Property.MONITOR_PORT, Property.MONITOR_LOG4J_PORT, Property.MASTER_CLIENTPORT,
+ Property.TRACE_PORT, Property.GC_PORT}) {
+ String value = conf.get(randomPortProp.getKey());
+ Assert.assertNotNull("Found no value for " + randomPortProp, value);
+ Assert.assertEquals("0", value);
+ }
+ }
+
@AfterClass
public static void tearDownMiniCluster() throws Exception {
accumulo.stop();
// folder.delete();
}
-
+
}
[4/7] git commit: Merge remote-tracking branch
'origin/1.5.3-SNAPSHOT' into 1.5.3-SNAPSHOT
Posted by el...@apache.org.
Merge remote-tracking branch 'origin/1.5.3-SNAPSHOT' into 1.5.3-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/52d30c7b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/52d30c7b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/52d30c7b
Branch: refs/heads/1.6.1-SNAPSHOT
Commit: 52d30c7be25e5f8f58574b1a400ec6f27c8ed814
Parents: 72fd6be 6719c37
Author: Josh Elser <el...@apache.org>
Authored: Fri Sep 19 15:00:09 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Sep 19 15:00:09 2014 -0400
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[6/7] git commit: Merge branch '1.5.3-SNAPSHOT' into 1.6.1-SNAPSHOT
Posted by el...@apache.org.
Merge branch '1.5.3-SNAPSHOT' into 1.6.1-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fbcf2f56
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fbcf2f56
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fbcf2f56
Branch: refs/heads/1.6.1-SNAPSHOT
Commit: fbcf2f5636c18fd1c65b9839b8255c22a56b8b7f
Parents: 3c6876d 52d30c7
Author: Josh Elser <el...@apache.org>
Authored: Fri Sep 19 15:00:22 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Sep 19 15:00:22 2014 -0400
----------------------------------------------------------------------
----------------------------------------------------------------------
[3/7] git commit: Merge remote-tracking branch
'origin/1.5.3-SNAPSHOT' into 1.5.3-SNAPSHOT
Posted by el...@apache.org.
Merge remote-tracking branch 'origin/1.5.3-SNAPSHOT' into 1.5.3-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/52d30c7b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/52d30c7b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/52d30c7b
Branch: refs/heads/1.5.3-SNAPSHOT
Commit: 52d30c7be25e5f8f58574b1a400ec6f27c8ed814
Parents: 72fd6be 6719c37
Author: Josh Elser <el...@apache.org>
Authored: Fri Sep 19 15:00:09 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Sep 19 15:00:09 2014 -0400
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[2/7] git commit: Merge remote-tracking branch
'origin/1.5.3-SNAPSHOT' into 1.5.3-SNAPSHOT
Posted by el...@apache.org.
Merge remote-tracking branch 'origin/1.5.3-SNAPSHOT' into 1.5.3-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/52d30c7b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/52d30c7b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/52d30c7b
Branch: refs/heads/master
Commit: 52d30c7be25e5f8f58574b1a400ec6f27c8ed814
Parents: 72fd6be 6719c37
Author: Josh Elser <el...@apache.org>
Authored: Fri Sep 19 15:00:09 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Sep 19 15:00:09 2014 -0400
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[5/7] git commit: Merge branch '1.5.3-SNAPSHOT' into 1.6.1-SNAPSHOT
Posted by el...@apache.org.
Merge branch '1.5.3-SNAPSHOT' into 1.6.1-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fbcf2f56
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fbcf2f56
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fbcf2f56
Branch: refs/heads/master
Commit: fbcf2f5636c18fd1c65b9839b8255c22a56b8b7f
Parents: 3c6876d 52d30c7
Author: Josh Elser <el...@apache.org>
Authored: Fri Sep 19 15:00:22 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Sep 19 15:00:22 2014 -0400
----------------------------------------------------------------------
----------------------------------------------------------------------
[7/7] git commit: Merge branch '1.6.1-SNAPSHOT'
Posted by el...@apache.org.
Merge branch '1.6.1-SNAPSHOT'
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0a421881
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0a421881
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0a421881
Branch: refs/heads/master
Commit: 0a42188122b5a4a057cb4ba4f53c427797a273ff
Parents: 9812ee3 fbcf2f5
Author: Josh Elser <el...@apache.org>
Authored: Fri Sep 19 15:00:29 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Sep 19 15:00:29 2014 -0400
----------------------------------------------------------------------
----------------------------------------------------------------------