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 2015/05/27 04:12:21 UTC
[1/7] accumulo git commit: ACCUMULO-3852 Handle null table
configuration
Repository: accumulo
Updated Branches:
refs/heads/1.7 ef902f276 -> caef59e4a
refs/heads/master 342b6b302 -> 650f1f9fe
ACCUMULO-3852 Handle null table configuration
If the configuration is null, that means it doesn't exist anymore.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/89d0fcbf
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/89d0fcbf
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/89d0fcbf
Branch: refs/heads/1.7
Commit: 89d0fcbfda91f2f629811ea9e7eff9f6e30ad336
Parents: ef902f2
Author: Josh Elser <jo...@gmail.com>
Authored: Tue May 26 17:30:43 2015 -0400
Committer: Josh Elser <jo...@gmail.com>
Committed: Tue May 26 18:42:00 2015 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/server/replication/ReplicationUtil.java | 5 +++++
.../java/org/apache/accumulo/master/replication/WorkMaker.java | 5 +++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/89d0fcbf/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
index 943d211..a8e7b64 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
@@ -132,6 +132,11 @@ public class ReplicationUtil {
}
TableConfiguration tableConf = context.getServerConfigurationFactory().getTableConfiguration(localId);
+ if (null == tableConf) {
+ log.trace("Could not get configuration for table {} (it no longer exists)", table);
+ continue;
+ }
+
for (Entry<String,String> prop : tableConf.getAllPropertiesWithPrefix(Property.TABLE_REPLICATION_TARGET).entrySet()) {
String peerName = prop.getKey().substring(Property.TABLE_REPLICATION_TARGET.getKey().length());
String remoteIdentifier = prop.getValue();
http://git-wip-us.apache.org/repos/asf/accumulo/blob/89d0fcbf/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
index 8532e1b..0333c5d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
@@ -113,6 +113,11 @@ public class WorkMaker {
// Get the table configuration for the table specified by the status record
tableConf = context.getServerConfigurationFactory().getTableConfiguration(tableId.toString());
+ // getTableConfiguration(String) returns null if the table no longer exists
+ if (null == tableConf) {
+ continue;
+ }
+
// Pull the relevant replication targets
// TODO Cache this instead of pulling it every time
Map<String,String> replicationTargets = getReplicationTargets(tableConf);
[7/7] accumulo git commit: Merge branch '1.7'
Posted by el...@apache.org.
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/650f1f9f
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/650f1f9f
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/650f1f9f
Branch: refs/heads/master
Commit: 650f1f9fefc092aa904bb98491d3373da4e5ce76
Parents: 342b6b3 caef59e
Author: Josh Elser <jo...@gmail.com>
Authored: Tue May 26 22:12:09 2015 -0400
Committer: Josh Elser <jo...@gmail.com>
Committed: Tue May 26 22:12:09 2015 -0400
----------------------------------------------------------------------
.../accumulo/server/replication/ReplicationUtil.java | 5 +++++
.../apache/accumulo/master/replication/WorkMaker.java | 5 +++++
.../org/apache/accumulo/tracer/AsyncSpanReceiver.java | 11 ++++++++---
.../tserver/replication/AccumuloReplicaSystem.java | 2 +-
4 files changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/650f1f9f/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
----------------------------------------------------------------------
[2/7] accumulo git commit: ACCUMULO-3852 Handle null table
configuration
Posted by el...@apache.org.
ACCUMULO-3852 Handle null table configuration
If the configuration is null, that means it doesn't exist anymore.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/89d0fcbf
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/89d0fcbf
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/89d0fcbf
Branch: refs/heads/master
Commit: 89d0fcbfda91f2f629811ea9e7eff9f6e30ad336
Parents: ef902f2
Author: Josh Elser <jo...@gmail.com>
Authored: Tue May 26 17:30:43 2015 -0400
Committer: Josh Elser <jo...@gmail.com>
Committed: Tue May 26 18:42:00 2015 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/server/replication/ReplicationUtil.java | 5 +++++
.../java/org/apache/accumulo/master/replication/WorkMaker.java | 5 +++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/89d0fcbf/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
index 943d211..a8e7b64 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
@@ -132,6 +132,11 @@ public class ReplicationUtil {
}
TableConfiguration tableConf = context.getServerConfigurationFactory().getTableConfiguration(localId);
+ if (null == tableConf) {
+ log.trace("Could not get configuration for table {} (it no longer exists)", table);
+ continue;
+ }
+
for (Entry<String,String> prop : tableConf.getAllPropertiesWithPrefix(Property.TABLE_REPLICATION_TARGET).entrySet()) {
String peerName = prop.getKey().substring(Property.TABLE_REPLICATION_TARGET.getKey().length());
String remoteIdentifier = prop.getValue();
http://git-wip-us.apache.org/repos/asf/accumulo/blob/89d0fcbf/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
index 8532e1b..0333c5d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
@@ -113,6 +113,11 @@ public class WorkMaker {
// Get the table configuration for the table specified by the status record
tableConf = context.getServerConfigurationFactory().getTableConfiguration(tableId.toString());
+ // getTableConfiguration(String) returns null if the table no longer exists
+ if (null == tableConf) {
+ continue;
+ }
+
// Pull the relevant replication targets
// TODO Cache this instead of pulling it every time
Map<String,String> replicationTargets = getReplicationTargets(tableConf);
[4/7] accumulo git commit: ACCUMULO-3850 Use the one-line toString
for the status
Posted by el...@apache.org.
ACCUMULO-3850 Use the one-line toString for the status
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5af27c28
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5af27c28
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5af27c28
Branch: refs/heads/1.7
Commit: 5af27c28eb8d2b34bb50761d3076a665a68eee25
Parents: 89d0fcb
Author: Josh Elser <jo...@gmail.com>
Authored: Tue May 26 18:41:06 2015 -0400
Committer: Josh Elser <jo...@gmail.com>
Committed: Tue May 26 18:42:06 2015 -0400
----------------------------------------------------------------------
.../apache/accumulo/tserver/replication/AccumuloReplicaSystem.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/5af27c28/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
index c28f341..e8e9627 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
@@ -484,7 +484,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
span.stop();
}
- log.debug("Recorded updated status for {}: {}", p, currentStatus);
+ log.debug("Recorded updated status for {}: {}", p, ProtobufUtil.toString(currentStatus));
// If we don't have any more work, just quit
if (!StatusUtil.isWorkRequired(currentStatus)) {
[5/7] accumulo git commit: ACCUMULO-3853 Explicitly track sendQueue
size
Posted by el...@apache.org.
ACCUMULO-3853 Explicitly track sendQueue size
size() on ConcurrentLinkedQueue is a linear operation
on the number of nodes in the queue which stinks. Keep
an explicit count on the size to avoid this.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/caef59e4
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/caef59e4
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/caef59e4
Branch: refs/heads/master
Commit: caef59e4a61f23be5de5d609a9bc8f2dba8bde57
Parents: 5af27c2
Author: Josh Elser <jo...@gmail.com>
Authored: Tue May 26 18:42:34 2015 -0400
Committer: Josh Elser <jo...@gmail.com>
Committed: Tue May 26 21:00:12 2015 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/tracer/AsyncSpanReceiver.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/caef59e4/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
index 9b8705a..d3a2fc5 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
@@ -16,6 +16,8 @@
*/
package org.apache.accumulo.tracer;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.AbstractQueue;
@@ -27,6 +29,7 @@ import java.util.Map.Entry;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.atomic.AtomicInteger;
import org.apache.accumulo.core.trace.DistributedTrace;
import org.apache.accumulo.tracer.thrift.Annotation;
@@ -38,8 +41,6 @@ import org.apache.htrace.TimelineAnnotation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
/**
* Deliver Span information periodically to a destination.
* <ul>
@@ -69,6 +70,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
Timer timer = new Timer("SpanSender", true);
protected final AbstractQueue<RemoteSpan> sendQueue = new ConcurrentLinkedQueue<RemoteSpan>();
+ protected final AtomicInteger sendQueueSize = new AtomicInteger(0);
int maxQueueSize = 5000;
long lastNotificationOfDroppedSpans = 0;
int minSpanSize = 1;
@@ -112,6 +114,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
sendQueue.remove();
sendQueue.notifyAll();
}
+ sendQueueSize.decrementAndGet();
continue;
}
SpanKey dest = getSpanKey(s.data);
@@ -130,6 +133,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
sendQueue.remove();
sendQueue.notifyAll();
}
+ sendQueueSize.decrementAndGet();
sent = true;
} catch (Exception ex) {
log.warn("Got error sending to " + dest + ", refreshing client", ex);
@@ -168,7 +172,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
SpanKey dest = getSpanKey(data);
if (dest != null) {
List<Annotation> annotations = convertToAnnotations(s.getTimelineAnnotations());
- if (sendQueue.size() > maxQueueSize) {
+ if (sendQueueSize.get() > maxQueueSize) {
long now = System.currentTimeMillis();
if (now - lastNotificationOfDroppedSpans > 60 * 1000) {
log.warn("Tracing spans are being dropped because there are already " + maxQueueSize + " spans queued for delivery.\n"
@@ -179,6 +183,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
}
sendQueue.add(new RemoteSpan(host, service == null ? s.getProcessId() : service, s.getTraceId(), s.getSpanId(), s.getParentId(), s.getStartTimeMillis(),
s.getStopTimeMillis(), s.getDescription(), data, annotations));
+ sendQueueSize.incrementAndGet();
}
}
[6/7] accumulo git commit: ACCUMULO-3853 Explicitly track sendQueue
size
Posted by el...@apache.org.
ACCUMULO-3853 Explicitly track sendQueue size
size() on ConcurrentLinkedQueue is a linear operation
on the number of nodes in the queue which stinks. Keep
an explicit count on the size to avoid this.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/caef59e4
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/caef59e4
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/caef59e4
Branch: refs/heads/1.7
Commit: caef59e4a61f23be5de5d609a9bc8f2dba8bde57
Parents: 5af27c2
Author: Josh Elser <jo...@gmail.com>
Authored: Tue May 26 18:42:34 2015 -0400
Committer: Josh Elser <jo...@gmail.com>
Committed: Tue May 26 21:00:12 2015 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/tracer/AsyncSpanReceiver.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/caef59e4/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
index 9b8705a..d3a2fc5 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
@@ -16,6 +16,8 @@
*/
package org.apache.accumulo.tracer;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.AbstractQueue;
@@ -27,6 +29,7 @@ import java.util.Map.Entry;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.atomic.AtomicInteger;
import org.apache.accumulo.core.trace.DistributedTrace;
import org.apache.accumulo.tracer.thrift.Annotation;
@@ -38,8 +41,6 @@ import org.apache.htrace.TimelineAnnotation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
/**
* Deliver Span information periodically to a destination.
* <ul>
@@ -69,6 +70,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
Timer timer = new Timer("SpanSender", true);
protected final AbstractQueue<RemoteSpan> sendQueue = new ConcurrentLinkedQueue<RemoteSpan>();
+ protected final AtomicInteger sendQueueSize = new AtomicInteger(0);
int maxQueueSize = 5000;
long lastNotificationOfDroppedSpans = 0;
int minSpanSize = 1;
@@ -112,6 +114,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
sendQueue.remove();
sendQueue.notifyAll();
}
+ sendQueueSize.decrementAndGet();
continue;
}
SpanKey dest = getSpanKey(s.data);
@@ -130,6 +133,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
sendQueue.remove();
sendQueue.notifyAll();
}
+ sendQueueSize.decrementAndGet();
sent = true;
} catch (Exception ex) {
log.warn("Got error sending to " + dest + ", refreshing client", ex);
@@ -168,7 +172,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
SpanKey dest = getSpanKey(data);
if (dest != null) {
List<Annotation> annotations = convertToAnnotations(s.getTimelineAnnotations());
- if (sendQueue.size() > maxQueueSize) {
+ if (sendQueueSize.get() > maxQueueSize) {
long now = System.currentTimeMillis();
if (now - lastNotificationOfDroppedSpans > 60 * 1000) {
log.warn("Tracing spans are being dropped because there are already " + maxQueueSize + " spans queued for delivery.\n"
@@ -179,6 +183,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements SpanRece
}
sendQueue.add(new RemoteSpan(host, service == null ? s.getProcessId() : service, s.getTraceId(), s.getSpanId(), s.getParentId(), s.getStartTimeMillis(),
s.getStopTimeMillis(), s.getDescription(), data, annotations));
+ sendQueueSize.incrementAndGet();
}
}
[3/7] accumulo git commit: ACCUMULO-3850 Use the one-line toString
for the status
Posted by el...@apache.org.
ACCUMULO-3850 Use the one-line toString for the status
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5af27c28
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5af27c28
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5af27c28
Branch: refs/heads/master
Commit: 5af27c28eb8d2b34bb50761d3076a665a68eee25
Parents: 89d0fcb
Author: Josh Elser <jo...@gmail.com>
Authored: Tue May 26 18:41:06 2015 -0400
Committer: Josh Elser <jo...@gmail.com>
Committed: Tue May 26 18:42:06 2015 -0400
----------------------------------------------------------------------
.../apache/accumulo/tserver/replication/AccumuloReplicaSystem.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/5af27c28/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
index c28f341..e8e9627 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
@@ -484,7 +484,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
span.stop();
}
- log.debug("Recorded updated status for {}: {}", p, currentStatus);
+ log.debug("Recorded updated status for {}: {}", p, ProtobufUtil.toString(currentStatus));
// If we don't have any more work, just quit
if (!StatusUtil.isWorkRequired(currentStatus)) {