ctubbsii commented on a change in pull request #2259:
URL: https://github.com/apache/accumulo/pull/2259#discussion_r745929699



##########
File path: 
server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
##########
@@ -63,18 +67,21 @@
   public static void main(String[] args) throws Exception {
     var siteConfig = SiteConfiguration.auto();
     var hadoopConf = new Configuration();
+
     Opts opts = new Opts();
-    List<String> argsList = new ArrayList<>(args.length + 2);
-    argsList.add("--old");
-    argsList.add("--new");
-    argsList.addAll(Arrays.asList(args));
-    try (TraceScope clientSpan =
-        opts.parseArgsAndTrace(ChangeSecret.class.getName(), 
argsList.toArray(new String[0]))) {
-
-      ServerContext context = opts.getServerContext();
-      try (var fs = context.getVolumeManager()) {
-        ServerDirs serverDirs = new ServerDirs(siteConfig, hadoopConf);
-        verifyHdfsWritePermission(serverDirs, fs);
+    ServerContext context = opts.getServerContext();
+    try (var fs = context.getVolumeManager()) {
+      ServerDirs serverDirs = new ServerDirs(siteConfig, hadoopConf);
+      verifyHdfsWritePermission(serverDirs, fs);
+
+      List<String> argsList = new ArrayList<>(args.length + 2);
+      argsList.add("--old");
+      argsList.add("--new");
+      argsList.addAll(Arrays.asList(args));
+
+      opts.parseArgs(ChangeSecret.class.getName(), args);
+      Span span = TraceUtil.createSpan(ChangeSecret.class, "main", 
SpanKind.CLIENT);
+      try (Scope scope = span.makeCurrent()) {

Review comment:
       After looking again, this doesn't matter. I don't even think we need to 
trace this utility at all.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to