incubator-accumulo-commits mailing list archives

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

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

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

Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java?rev=1208692&r1=1208691&r2=1208692&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
(original)
+++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
Wed Nov 30 18:46:02 2011
@@ -55,13 +55,82 @@ import org.apache.accumulo.core.data.thr
 import org.apache.accumulo.core.security.AuditLevel;
 import org.apache.accumulo.core.security.thrift.AuthInfo;
 import org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException;
+import org.apache.accumulo.core.trace.DistributedTrace;
 import org.apache.accumulo.core.util.BadArgumentException;
 import org.apache.accumulo.core.util.format.BinaryFormatter;
 import org.apache.accumulo.core.util.format.DefaultFormatter;
 import org.apache.accumulo.core.util.format.Formatter;
 import org.apache.accumulo.core.util.format.FormatterFactory;
-import org.apache.accumulo.core.util.shell.commands.*;
-import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.core.util.shell.commands.AboutCommand;
+import org.apache.accumulo.core.util.shell.commands.AddSplitsCommand;
+import org.apache.accumulo.core.util.shell.commands.AuthenticateCommand;
+import org.apache.accumulo.core.util.shell.commands.ByeCommand;
+import org.apache.accumulo.core.util.shell.commands.ClasspathCommand;
+import org.apache.accumulo.core.util.shell.commands.ClearCommand;
+import org.apache.accumulo.core.util.shell.commands.CloneTableCommand;
+import org.apache.accumulo.core.util.shell.commands.ClsCommand;
+import org.apache.accumulo.core.util.shell.commands.CompactCommand;
+import org.apache.accumulo.core.util.shell.commands.ConfigCommand;
+import org.apache.accumulo.core.util.shell.commands.CreateTableCommand;
+import org.apache.accumulo.core.util.shell.commands.CreateUserCommand;
+import org.apache.accumulo.core.util.shell.commands.DUCommand;
+import org.apache.accumulo.core.util.shell.commands.DebugCommand;
+import org.apache.accumulo.core.util.shell.commands.DeleteCommand;
+import org.apache.accumulo.core.util.shell.commands.DeleteIterCommand;
+import org.apache.accumulo.core.util.shell.commands.DeleteManyCommand;
+import org.apache.accumulo.core.util.shell.commands.DeleteRowsCommand;
+import org.apache.accumulo.core.util.shell.commands.DeleteScanIterCommand;
+import org.apache.accumulo.core.util.shell.commands.DeleteTableCommand;
+import org.apache.accumulo.core.util.shell.commands.DeleteUserCommand;
+import org.apache.accumulo.core.util.shell.commands.DropTableCommand;
+import org.apache.accumulo.core.util.shell.commands.DropUserCommand;
+import org.apache.accumulo.core.util.shell.commands.EGrepCommand;
+import org.apache.accumulo.core.util.shell.commands.ExecfileCommand;
+import org.apache.accumulo.core.util.shell.commands.ExitCommand;
+import org.apache.accumulo.core.util.shell.commands.FlushCommand;
+import org.apache.accumulo.core.util.shell.commands.FormatterCommand;
+import org.apache.accumulo.core.util.shell.commands.GetAuthsCommand;
+import org.apache.accumulo.core.util.shell.commands.GetGroupsCommand;
+import org.apache.accumulo.core.util.shell.commands.GetSplitsCommand;
+import org.apache.accumulo.core.util.shell.commands.GrantCommand;
+import org.apache.accumulo.core.util.shell.commands.GrepCommand;
+import org.apache.accumulo.core.util.shell.commands.HelpCommand;
+import org.apache.accumulo.core.util.shell.commands.HiddenCommand;
+import org.apache.accumulo.core.util.shell.commands.HistoryCommand;
+import org.apache.accumulo.core.util.shell.commands.ImportDirectoryCommand;
+import org.apache.accumulo.core.util.shell.commands.InfoCommand;
+import org.apache.accumulo.core.util.shell.commands.InsertCommand;
+import org.apache.accumulo.core.util.shell.commands.ListScansCommand;
+import org.apache.accumulo.core.util.shell.commands.MasterStateCommand;
+import org.apache.accumulo.core.util.shell.commands.MaxRowCommand;
+import org.apache.accumulo.core.util.shell.commands.MergeCommand;
+import org.apache.accumulo.core.util.shell.commands.NoTableCommand;
+import org.apache.accumulo.core.util.shell.commands.OfflineCommand;
+import org.apache.accumulo.core.util.shell.commands.OnlineCommand;
+import org.apache.accumulo.core.util.shell.commands.PasswdCommand;
+import org.apache.accumulo.core.util.shell.commands.QuestionCommand;
+import org.apache.accumulo.core.util.shell.commands.QuitCommand;
+import org.apache.accumulo.core.util.shell.commands.QuotedStringTokenizer;
+import org.apache.accumulo.core.util.shell.commands.RenameTableCommand;
+import org.apache.accumulo.core.util.shell.commands.RevokeCommand;
+import org.apache.accumulo.core.util.shell.commands.ScanCommand;
+import org.apache.accumulo.core.util.shell.commands.SelectCommand;
+import org.apache.accumulo.core.util.shell.commands.SelectrowCommand;
+import org.apache.accumulo.core.util.shell.commands.SetAuthsCommand;
+import org.apache.accumulo.core.util.shell.commands.SetGroupsCommand;
+import org.apache.accumulo.core.util.shell.commands.SetIterCommand;
+import org.apache.accumulo.core.util.shell.commands.SetScanIterCommand;
+import org.apache.accumulo.core.util.shell.commands.SleepCommand;
+import org.apache.accumulo.core.util.shell.commands.SystemPermissionsCommand;
+import org.apache.accumulo.core.util.shell.commands.TableCommand;
+import org.apache.accumulo.core.util.shell.commands.TablePermissionsCommand;
+import org.apache.accumulo.core.util.shell.commands.TablesCommand;
+import org.apache.accumulo.core.util.shell.commands.TraceCommand;
+import org.apache.accumulo.core.util.shell.commands.UserCommand;
+import org.apache.accumulo.core.util.shell.commands.UserPermissionsCommand;
+import org.apache.accumulo.core.util.shell.commands.UsersCommand;
+import org.apache.accumulo.core.util.shell.commands.WhoAmICommand;
+import org.apache.accumulo.core.zookeeper.ZooReader;
 import org.apache.commons.cli.BasicParser;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.HelpFormatter;
@@ -75,9 +144,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 
-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
  */
@@ -233,9 +299,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, new ZooReader(instance), "shell", InetAddress.getLocalHost().getHostName());
       }
       
       this.reader = new ConsoleReader();



Mime
View raw message