accumulo git commit: ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration

2015-11-13 Thread ecn
Repository: accumulo
Updated Branches:
  refs/heads/1.6 1619ae409 -> 78522c4cd


ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/78522c4c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/78522c4c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/78522c4c

Branch: refs/heads/1.6
Commit: 78522c4cd4432ee2ab78c4b585fa040ff4e1c365
Parents: 1619ae4
Author: Eric C. Newton 
Authored: Fri Nov 13 06:53:56 2015 -0500
Committer: Eric C. Newton 
Committed: Fri Nov 13 06:53:56 2015 -0500

--
 .../src/main/java/org/apache/accumulo/core/conf/Property.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/78522c4c/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java 
b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index d17b8aa..6d1f043 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -523,8 +523,13 @@ public enum Property {
 return hasAnnotation(Deprecated.class) || 
hasPrefixWithAnnotation(getKey(), Deprecated.class);
   }
 
+  private volatile Boolean isSensitive = null;
+
   public boolean isSensitive() {
-return hasAnnotation(Sensitive.class) || hasPrefixWithAnnotation(getKey(), 
Sensitive.class);
+if (isSensitive == null) {
+  isSensitive = hasAnnotation(Sensitive.class) || 
hasPrefixWithAnnotation(getKey(), Sensitive.class);
+}
+return isSensitive.booleanValue();
   }
 
   public static boolean isSensitive(String key) {



[2/2] accumulo git commit: ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration

2015-11-13 Thread ecn
ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/81b6d5b9
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/81b6d5b9
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/81b6d5b9

Branch: refs/heads/1.7
Commit: 81b6d5b94d4e99d68fd0fcc07433e25219cecd94
Parents: b8ffe4c 78522c4
Author: Eric C. Newton 
Authored: Fri Nov 13 06:57:34 2015 -0500
Committer: Eric C. Newton 
Committed: Fri Nov 13 06:57:34 2015 -0500

--
 .../src/main/java/org/apache/accumulo/core/conf/Property.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/81b6d5b9/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --cc core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 055e7dd,6d1f043..df53791
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@@ -668,23 -523,15 +668,28 @@@ public enum Property 
  return hasAnnotation(Deprecated.class) || 
hasPrefixWithAnnotation(getKey(), Deprecated.class);
}
  
+   private volatile Boolean isSensitive = null;
+ 
 +  /**
 +   * Checks if this property is sensitive.
 +   *
 +   * @return true if this property is sensitive
 +   */
public boolean isSensitive() {
- return hasAnnotation(Sensitive.class) || 
hasPrefixWithAnnotation(getKey(), Sensitive.class);
+ if (isSensitive == null) {
+   isSensitive = hasAnnotation(Sensitive.class) || 
hasPrefixWithAnnotation(getKey(), Sensitive.class);
+ }
+ return isSensitive.booleanValue();
}
  
 +  /**
 +   * Checks if a property with the given key is sensitive. The key must be 
for a valid property, and must either itself be annotated as sensitive or have a
 +   * prefix annotated as sensitive.
 +   *
 +   * @param key
 +   *  property key
 +   * @return true if property is sensitive
 +   */
public static boolean isSensitive(String key) {
  return hasPrefixWithAnnotation(key, Sensitive.class);
}



[1/2] accumulo git commit: ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration

2015-11-13 Thread ecn
Repository: accumulo
Updated Branches:
  refs/heads/1.7 b8ffe4c76 -> 81b6d5b94


ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/78522c4c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/78522c4c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/78522c4c

Branch: refs/heads/1.7
Commit: 78522c4cd4432ee2ab78c4b585fa040ff4e1c365
Parents: 1619ae4
Author: Eric C. Newton 
Authored: Fri Nov 13 06:53:56 2015 -0500
Committer: Eric C. Newton 
Committed: Fri Nov 13 06:53:56 2015 -0500

--
 .../src/main/java/org/apache/accumulo/core/conf/Property.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/78522c4c/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java 
b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index d17b8aa..6d1f043 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -523,8 +523,13 @@ public enum Property {
 return hasAnnotation(Deprecated.class) || 
hasPrefixWithAnnotation(getKey(), Deprecated.class);
   }
 
+  private volatile Boolean isSensitive = null;
+
   public boolean isSensitive() {
-return hasAnnotation(Sensitive.class) || hasPrefixWithAnnotation(getKey(), 
Sensitive.class);
+if (isSensitive == null) {
+  isSensitive = hasAnnotation(Sensitive.class) || 
hasPrefixWithAnnotation(getKey(), Sensitive.class);
+}
+return isSensitive.booleanValue();
   }
 
   public static boolean isSensitive(String key) {



[5/6] accumulo git commit: Merge branch '1.7'

2015-11-13 Thread ecn
Merge branch '1.7'


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/58911cc8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/58911cc8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/58911cc8

Branch: refs/heads/master
Commit: 58911cc8e2277a4b192673217aaf996216a0898c
Parents: 139f489 81b6d5b
Author: Eric C. Newton 
Authored: Fri Nov 13 06:57:46 2015 -0500
Committer: Eric C. Newton 
Committed: Fri Nov 13 06:57:46 2015 -0500

--
 .../src/main/java/org/apache/accumulo/core/conf/Property.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/58911cc8/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--



[1/6] accumulo git commit: ACCUMULO-4034 pester the gc and secondarynamenode, too

2015-11-13 Thread ecn
Repository: accumulo
Updated Branches:
  refs/heads/master 0e136c1f4 -> 35cc52e94


ACCUMULO-4034 pester the gc and secondarynamenode, too


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8a8d674b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8a8d674b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8a8d674b

Branch: refs/heads/master
Commit: 8a8d674b2c4352a03e945f06272b7c06216a9c13
Parents: 8f52ab2
Author: Eric C. Newton 
Authored: Fri Oct 23 16:00:04 2015 -0400
Committer: Eric C. Newton 
Committed: Fri Oct 23 16:00:04 2015 -0400

--
 test/system/agitator/agitator.py | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8a8d674b/test/system/agitator/agitator.py
--
diff --git a/test/system/agitator/agitator.py b/test/system/agitator/agitator.py
index e458016..cfab019 100755
--- a/test/system/agitator/agitator.py
+++ b/test/system/agitator/agitator.py
@@ -190,10 +190,12 @@ def main():
parser = argparse.ArgumentParser(description='Kill random processes')
parser.add_argument('--log', help='set the log level', default='INFO')
parser.add_argument('--namenodes', help='randomly kill namenodes', 
action="store_true")
+   parser.add_argument('--secondary', help='randomly kill secondary namenode', 
action="store_true")
parser.add_argument('--datanodes', help='randomly kill datanodes', 
action="store_true")
parser.add_argument('--tservers', help='randomly kill tservers', 
action="store_true")
parser.add_argument('--masters', help='randomly kill masters', 
action="store_true")
parser.add_argument('--zookeepers', help='randomly kill zookeepers', 
action="store_true")
+   parser.add_argument('--gc', help='randomly kill the file garbage 
collector', action="store_true")
parser.add_argument('--all', 
help='kill any of the tservers, masters, datanodes, 
namenodes or zookeepers', 
action='store_true')
@@ -214,8 +216,10 @@ def main():
 
addIf(args.namenodes,  Hadoop('namenode'))
addIf(args.datanodes,  Hadoop('datanode'))
+   addIf(args.secondary,  Hadoop('secondarynamenode'))
addIf(args.tservers,   Accumulo('tserver'))
addIf(args.masters,Accumulo('master'))
+   addIf(args.gc, Accumulo('gc'))
addIf(args.zookeepers, Zookeeper())
if len(procs) == 0:
fail("No processes to agitate!\n")



[3/6] accumulo git commit: ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration

2015-11-13 Thread ecn
ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/78522c4c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/78522c4c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/78522c4c

Branch: refs/heads/master
Commit: 78522c4cd4432ee2ab78c4b585fa040ff4e1c365
Parents: 1619ae4
Author: Eric C. Newton 
Authored: Fri Nov 13 06:53:56 2015 -0500
Committer: Eric C. Newton 
Committed: Fri Nov 13 06:53:56 2015 -0500

--
 .../src/main/java/org/apache/accumulo/core/conf/Property.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/78522c4c/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java 
b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index d17b8aa..6d1f043 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -523,8 +523,13 @@ public enum Property {
 return hasAnnotation(Deprecated.class) || 
hasPrefixWithAnnotation(getKey(), Deprecated.class);
   }
 
+  private volatile Boolean isSensitive = null;
+
   public boolean isSensitive() {
-return hasAnnotation(Sensitive.class) || hasPrefixWithAnnotation(getKey(), 
Sensitive.class);
+if (isSensitive == null) {
+  isSensitive = hasAnnotation(Sensitive.class) || 
hasPrefixWithAnnotation(getKey(), Sensitive.class);
+}
+return isSensitive.booleanValue();
   }
 
   public static boolean isSensitive(String key) {



[2/6] accumulo git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo

2015-11-13 Thread ecn
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/139f489c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/139f489c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/139f489c

Branch: refs/heads/master
Commit: 139f489cad4afc3773f81b919d57010dc72db6d1
Parents: 8a8d674 0e136c1
Author: Eric C. Newton 
Authored: Fri Nov 13 06:45:12 2015 -0500
Committer: Eric C. Newton 
Committed: Fri Nov 13 06:45:12 2015 -0500

--
 assemble/bin/bootstrap_config.sh| 29 -
 assemble/conf/templates/accumulo-site.xml   |  9 
 .../org/apache/accumulo/core/conf/Property.java | 11 +++--
 .../iterators/system/TimeSettingIterator.java   |  2 +-
 .../system/TimeSettingIteratorTest.java | 31 --
 .../master/balancer/ChaoticLoadBalancer.java| 17 
 .../accumulo/gc/GarbageCollectionAlgorithm.java |  5 +--
 .../org/apache/accumulo/monitor/Monitor.java|  3 --
 .../apache/accumulo/tserver/TabletServer.java   | 16 +--
 .../tserver/log/TabletServerLogger.java | 44 +++-
 .../accumulo/test/TabletServerGivesUpIT.java|  2 +
 11 files changed, 141 insertions(+), 28 deletions(-)
--




[4/6] accumulo git commit: ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration

2015-11-13 Thread ecn
ACCUMULO-4041 memoize isSensitive for faster lookups in getSiteConfiguration


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/81b6d5b9
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/81b6d5b9
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/81b6d5b9

Branch: refs/heads/master
Commit: 81b6d5b94d4e99d68fd0fcc07433e25219cecd94
Parents: b8ffe4c 78522c4
Author: Eric C. Newton 
Authored: Fri Nov 13 06:57:34 2015 -0500
Committer: Eric C. Newton 
Committed: Fri Nov 13 06:57:34 2015 -0500

--
 .../src/main/java/org/apache/accumulo/core/conf/Property.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/81b6d5b9/core/src/main/java/org/apache/accumulo/core/conf/Property.java
--
diff --cc core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 055e7dd,6d1f043..df53791
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@@ -668,23 -523,15 +668,28 @@@ public enum Property 
  return hasAnnotation(Deprecated.class) || 
hasPrefixWithAnnotation(getKey(), Deprecated.class);
}
  
+   private volatile Boolean isSensitive = null;
+ 
 +  /**
 +   * Checks if this property is sensitive.
 +   *
 +   * @return true if this property is sensitive
 +   */
public boolean isSensitive() {
- return hasAnnotation(Sensitive.class) || 
hasPrefixWithAnnotation(getKey(), Sensitive.class);
+ if (isSensitive == null) {
+   isSensitive = hasAnnotation(Sensitive.class) || 
hasPrefixWithAnnotation(getKey(), Sensitive.class);
+ }
+ return isSensitive.booleanValue();
}
  
 +  /**
 +   * Checks if a property with the given key is sensitive. The key must be 
for a valid property, and must either itself be annotated as sensitive or have a
 +   * prefix annotated as sensitive.
 +   *
 +   * @param key
 +   *  property key
 +   * @return true if property is sensitive
 +   */
public static boolean isSensitive(String key) {
  return hasPrefixWithAnnotation(key, Sensitive.class);
}



[6/6] accumulo git commit: ACCUMULO-4034 agitate secondary NN and gc, too

2015-11-13 Thread ecn
ACCUMULO-4034 agitate secondary NN and gc, too


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/35cc52e9
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/35cc52e9
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/35cc52e9

Branch: refs/heads/master
Commit: 35cc52e9473ba25b990a5a02731cee11d9301e76
Parents: 58911cc
Author: Eric C. Newton 
Authored: Fri Nov 13 07:04:03 2015 -0500
Committer: Eric C. Newton 
Committed: Fri Nov 13 07:04:03 2015 -0500

--
 test/system/agitator/agitator.ini.example | 8 
 test/system/agitator/agitator.py  | 9 ++---
 2 files changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/35cc52e9/test/system/agitator/agitator.ini.example
--
diff --git a/test/system/agitator/agitator.ini.example 
b/test/system/agitator/agitator.ini.example
index c6f16c7..3512561 100644
--- a/test/system/agitator/agitator.ini.example
+++ b/test/system/agitator/agitator.ini.example
@@ -29,10 +29,15 @@ home=%(install)s/accumulo
 tserver.kill.min=1
 tserver.kill.max=1
 tserver.frequency=0.8
+
 master.kill.min=1
 master.kill.max=1
 master.frequency=0.1
 
+gc.kill.min=1
+gc.kill.max=1
+gc.frequency=0.1
+
 [hadoop]
 home=%(install)s/hadoop
 bin=%(home)s/bin
@@ -42,6 +47,9 @@ datanode.kill.max=1
 namenode.frequency=0.05
 namenode.kill.min=1
 namenode.kill.max=1
+secondarynamenode.frequency=0.05
+secondarynamenode.kill.min=1
+secondarynamenode.kill.max=1
 
 [zookeeper]
 home=%(install)s/zookeeper

http://git-wip-us.apache.org/repos/asf/accumulo/blob/35cc52e9/test/system/agitator/agitator.py
--
diff --git a/test/system/agitator/agitator.py b/test/system/agitator/agitator.py
index cfab019..db94546 100755
--- a/test/system/agitator/agitator.py
+++ b/test/system/agitator/agitator.py
@@ -158,10 +158,13 @@ def agitate(hosts, procs):
  if random.random() < p.frequencyToKill():
 
 # find them
-# TODO: in parallel
+from multiprocessing import Pool
+def finder(host):
+   return host, p.find(host)
+with Pool(5) as pool:
+   result = pool.map(finder, hosts)
 candidates = {}
-for host in hosts:
-   pids = p.find(host)
+for host, pids in result:
if pids:
   candidates[host] = pids