You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2011/11/30 19:50:28 UTC

svn commit: r1208695 - in /incubator/accumulo/trunk: ./ src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java

Author: ecn
Date: Wed Nov 30 18:50:28 2011
New Revision: 1208695

URL: http://svn.apache.org/viewvc?rev=1208695&view=rev
Log:
ACCUMULO-194: merge to trunk

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 30 18:50:28 2011
@@ -1,2 +1,2 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031
-/incubator/accumulo/branches/1.4:1201902-1208600
+/incubator/accumulo/branches/1.4:1201902-1208600,1208692

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java?rev=1208695&r1=1208694&r2=1208695&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java Wed Nov 30 18:50:28 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
  */
@@ -234,9 +300,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();