incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1208694 - /incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
Date Wed, 30 Nov 2011 18:49:25 GMT
Author: ecn
Date: Wed Nov 30 18:49:25 2011
New Revision: 1208694

URL: http://svn.apache.org/viewvc?rev=1208694&view=rev
Log:
ACCUMULO-194: use existing convenience method to configure distributed tracing

Modified:
    incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java?rev=1208694&r1=1208693&r2=1208694&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
(original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
Wed Nov 30 18:49:25 2011
@@ -81,13 +81,13 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.iterators.FilteringIterator;
 import org.apache.accumulo.core.iterators.GrepIterator;
 import org.apache.accumulo.core.iterators.IteratorUtil;
+import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
 import org.apache.accumulo.core.iterators.NoLabelIterator;
 import org.apache.accumulo.core.iterators.OptionDescriber;
+import org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions;
 import org.apache.accumulo.core.iterators.RegExIterator;
 import org.apache.accumulo.core.iterators.SortedKeyIterator;
 import org.apache.accumulo.core.iterators.VersioningIterator;
-import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
-import org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions;
 import org.apache.accumulo.core.iterators.aggregation.conf.AggregatorConfiguration;
 import org.apache.accumulo.core.iterators.filter.AgeOffFilter;
 import org.apache.accumulo.core.iterators.filter.RegExFilter;
@@ -99,15 +99,16 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.core.security.thrift.AuthInfo;
 import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException;
+import org.apache.accumulo.core.trace.DistributedTrace;
 import org.apache.accumulo.core.trace.TraceDump;
 import org.apache.accumulo.core.trace.TraceDump.Printer;
 import org.apache.accumulo.core.util.BadArgumentException;
+import org.apache.accumulo.core.util.BulkImportHelper.AssignmentStats;
 import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.core.util.Duration;
 import org.apache.accumulo.core.util.LocalityGroupUtil;
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.core.util.BulkImportHelper.AssignmentStats;
 import org.apache.accumulo.core.util.format.DefaultFormatter;
 import org.apache.accumulo.core.util.format.DeleterFormatter;
 import org.apache.accumulo.core.util.format.Formatter;
@@ -134,8 +135,6 @@ import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 
 import cloudtrace.instrument.Trace;
-import cloudtrace.instrument.Tracer;
-import cloudtrace.instrument.receivers.ZooSpanClient;
 
 /**
  * A convenient console interface to perform basic accumulo functions Includes auto-complete,
help, and quoted strings with escape sequences
@@ -290,9 +289,7 @@ public class Shell {
     byte[] pass;
     try {
       if (!cl.hasOption(fakeOption.getLongOpt())) {
-        String localhost = InetAddress.getLocalHost().getHostName();
-        String path = ZooUtil.getRoot(instance) + Constants.ZTRACERS;
-        Tracer.getInstance().addReceiver(new ZooSpanClient(instance.getZooKeepers(), path,
localhost, "shell", 1000));
+        DistributedTrace.enable(instance, "shell", InetAddress.getLocalHost().getHostName());
       }
       
       this.reader = new ConsoleReader();



Mime
View raw message