You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2014/01/23 18:15:09 UTC

[1/5] git commit: ACCUMULO-2224 link TODOs to new JIRAs

Updated Branches:
  refs/heads/master 353badb05 -> 9496199d0


ACCUMULO-2224 link TODOs to new JIRAs


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

Branch: refs/heads/master
Commit: de7d198459ba745b0d2d5a3c60b2be7286742f39
Parents: f778dcf
Author: Mike Drob <md...@cloudera.com>
Authored: Thu Jan 23 09:18:45 2014 -0500
Committer: Mike Drob <md...@cloudera.com>
Committed: Thu Jan 23 09:18:45 2014 -0500

----------------------------------------------------------------------
 .../test/java/org/apache/accumulo/core/util/AddressUtilTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/de7d1984/src/core/src/test/java/org/apache/accumulo/core/util/AddressUtilTest.java
----------------------------------------------------------------------
diff --git a/src/core/src/test/java/org/apache/accumulo/core/util/AddressUtilTest.java b/src/core/src/test/java/org/apache/accumulo/core/util/AddressUtilTest.java
index e71ba0e..6268fe9 100644
--- a/src/core/src/test/java/org/apache/accumulo/core/util/AddressUtilTest.java
+++ b/src/core/src/test/java/org/apache/accumulo/core/util/AddressUtilTest.java
@@ -61,7 +61,7 @@ public class AddressUtilTest extends TestCase {
     log.info("Checking that we can get the ttl on dns failures.");
     int expectedTtl = 20;
     boolean expectException = false;
-    /* TODO replace all of this with Powermock on the Security class */
+    /* TODO ACCUMULO-2242 replace all of this with Powermock on the Security class */
     try {
       Security.setProperty("networkaddress.cache.negative.ttl", Integer.toString(expectedTtl));
     } catch (SecurityException exception) {
@@ -104,7 +104,7 @@ public class AddressUtilTest extends TestCase {
 
   public void testGetNegativeTtlThrowsOnForever() {
     log.info("When DNS is cached forever, we should throw.");
-    /* TODO replace all of this with Powermock on the Security class */
+    /* TODO ACCUMULO-2242 replace all of this with Powermock on the Security class */
     try {
       Security.setProperty("networkaddress.cache.negative.ttl", "-1");
     } catch (SecurityException exception) {


[3/5] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Posted by kt...@apache.org.
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT


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

Branch: refs/heads/master
Commit: 182f1526097e0b13d5b1f0e38bdda862c7fb4bb6
Parents: e7e5c00 fbed7af
Author: Mike Drob <md...@cloudera.com>
Authored: Thu Jan 23 09:23:01 2014 -0500
Committer: Mike Drob <md...@cloudera.com>
Committed: Thu Jan 23 09:23:01 2014 -0500

----------------------------------------------------------------------
 .../test/java/org/apache/accumulo/fate/util/AddressUtilTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[4/5] git commit: ACCUMULO-2154 Ignore NoNodeException while getting DeadServerList

Posted by kt...@apache.org.
ACCUMULO-2154 Ignore NoNodeException while getting DeadServerList

Signed-off-by: Keith Turner <kt...@apache.org>


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

Branch: refs/heads/master
Commit: ecdd8528ddf0108919ec48dc545e765c2c3aa364
Parents: 182f152
Author: Vikram Srivastava <vi...@cloudera.com>
Authored: Thu Jan 23 02:42:19 2014 -0800
Committer: Keith Turner <kt...@apache.org>
Committed: Thu Jan 23 12:14:38 2014 -0500

----------------------------------------------------------------------
 .../accumulo/server/master/state/DeadServerList.java     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecdd8528/server/base/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java
index b2ea7d6..e1ffd2f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java
@@ -26,6 +26,7 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.data.Stat;
+import org.apache.zookeeper.KeeperException.NoNodeException;
 
 public class DeadServerList {
   private static final Logger log = Logger.getLogger(DeadServerList.class);
@@ -49,7 +50,15 @@ public class DeadServerList {
       if (children != null) {
         for (String child : children) {
           Stat stat = new Stat();
-          byte[] data = zoo.getData(path + "/" + child, stat);
+          byte[] data;
+          try {
+            data = zoo.getData(path + "/" + child, stat);
+          } catch (NoNodeException nne) {
+            // Another thread or process can delete child while this loop is running.
+            // We ignore this error since it's harmless if we miss the deleted server
+            // in the dead server list.
+            continue;
+          }
           DeadServer server = new DeadServer(child, stat.getMtime(), new String(data));
           result.add(server);
         }


[2/5] git commit: Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

Posted by kt...@apache.org.
Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT


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

Branch: refs/heads/master
Commit: fbed7afab4ff024872a04a3a4dae76558380ab02
Parents: c4cd3b1 de7d198
Author: Mike Drob <md...@cloudera.com>
Authored: Thu Jan 23 09:22:44 2014 -0500
Committer: Mike Drob <md...@cloudera.com>
Committed: Thu Jan 23 09:22:44 2014 -0500

----------------------------------------------------------------------
 .../test/java/org/apache/accumulo/fate/util/AddressUtilTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fbed7afa/fate/src/test/java/org/apache/accumulo/fate/util/AddressUtilTest.java
----------------------------------------------------------------------
diff --cc fate/src/test/java/org/apache/accumulo/fate/util/AddressUtilTest.java
index aca4571,0000000..7d43381
mode 100644,000000..100644
--- a/fate/src/test/java/org/apache/accumulo/fate/util/AddressUtilTest.java
+++ b/fate/src/test/java/org/apache/accumulo/fate/util/AddressUtilTest.java
@@@ -1,95 -1,0 +1,95 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.fate.util;
 +
 +import java.security.Security;
 +
 +import junit.framework.TestCase;
 +
 +import org.apache.log4j.Logger;
 +
 +/**
 + * Test the AddressUtil class.
 + * 
 + */
 +public class AddressUtilTest extends TestCase {
 +
 +  private static final Logger log = Logger.getLogger(AddressUtilTest.class);
 +
 +  public void testGetNegativeTtl() {
 +    log.info("Checking that we can get the ttl on dns failures.");
 +    int expectedTtl = 20;
 +    boolean expectException = false;
-     /* TODO replace all of this with Powermock on the Security class */
++    /* TODO ACCUMULO-2242 replace all of this with Powermock on the Security class */
 +    try {
 +      Security.setProperty("networkaddress.cache.negative.ttl", Integer.toString(expectedTtl));
 +    } catch (SecurityException exception) {
 +      log.warn("We can't set the DNS cache period, so we're only testing fetching the system value.");
 +      expectedTtl = 10;
 +    }
 +    try {
 +      expectedTtl = Integer.parseInt(Security.getProperty("networkaddress.cache.negative.ttl"));
 +    } catch (SecurityException exception) {
 +      log.debug("Security manager won't let us fetch the property, testing default path.");
 +      expectedTtl = 10;
 +    } catch (NumberFormatException exception) {
 +      log.debug("property isn't a number, testing default path.");
 +      expectedTtl = 10;
 +    }
 +    if (-1 == expectedTtl) {
 +      log.debug("property is set to 'forever', testing exception path");
 +      expectException = true;
 +    }
 +    if (0 > expectedTtl) {
 +      log.debug("property is a negative value other than 'forever', testing default path.");
 +      expectedTtl = 10;
 +    }
 +    try {
 +      if (expectException) {
 +        log.info("AddressUtil is (hopefully) going to spit out an error about DNS lookups. you can ignore it.");
 +      }
 +      int result = AddressUtil.getAddressCacheNegativeTtl(null);
 +      if (expectException) {
 +        fail("The JVM Security settings cache DNS failures forever. In this case we expect an exception but didn't get one.");
 +      }
 +      assertEquals("Didn't get the ttl we expected", expectedTtl, result);
 +    } catch (IllegalArgumentException exception) {
 +      if (!expectException) {
 +        log.error("Got an exception when we weren't expecting.", exception);
 +        fail("We only expect to throw an IllegalArgumentException when the JVM caches DNS failures forever.");
 +      }
 +    }
 +  }
 +
 +  public void testGetNegativeTtlThrowsOnForever() {
 +    log.info("When DNS is cached forever, we should throw.");
-     /* TODO replace all of this with Powermock on the Security class */
++    /* TODO ACCUMULO-2242 replace all of this with Powermock on the Security class */
 +    try {
 +      Security.setProperty("networkaddress.cache.negative.ttl", "-1");
 +    } catch (SecurityException exception) {
 +      log.error("We can't set the DNS cache period, so this test is effectively ignored.");
 +      return;
 +    }
 +    try {
 +      log.info("AddressUtil is (hopefully) going to spit out an error about DNS lookups. you can ignore it.");
 +      int result = AddressUtil.getAddressCacheNegativeTtl(null);
 +      fail("The JVM Security settings cache DNS failures forever, this should cause an exception.");
 +    } catch(IllegalArgumentException exception) {
 +      assertTrue(true);
 +    }
 +  }
 +}


[5/5] git commit: Merge branch '1.6.0-SNAPSHOT'

Posted by kt...@apache.org.
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: 9496199d06b2530fe086956645582feec125ab4e
Parents: 353badb ecdd852
Author: Keith Turner <kt...@apache.org>
Authored: Thu Jan 23 12:20:08 2014 -0500
Committer: Keith Turner <kt...@apache.org>
Committed: Thu Jan 23 12:20:08 2014 -0500

----------------------------------------------------------------------
 .../org/apache/accumulo/fate/util/AddressUtilTest.java   |  4 ++--
 .../accumulo/server/master/state/DeadServerList.java     | 11 ++++++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------