You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2023/07/14 13:17:26 UTC

[GitHub] [accumulo] dlmarion commented on a diff in pull request #3604: Removes split,bulk, and compaction code from tserver

dlmarion commented on code in PR #3604:
URL: https://github.com/apache/accumulo/pull/3604#discussion_r1263702387


##########
server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java:
##########
@@ -531,50 +133,4 @@ public static <T extends TabletFile> Map<T,FileInfo> tryToGetFirstAndLastRows(
 
     return dataFilesInfo;
   }
-
-  public static <T extends TabletFile> WritableComparable<Key> findLastKey(ServerContext context,
-      TableConfiguration tableConf, Collection<T> dataFiles) throws IOException {
-
-    Key lastKey = null;
-
-    for (T file : dataFiles) {
-      FileSystem ns = context.getVolumeManager().getFileSystemByPath(file.getPath());
-      FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder()
-          .forFile(file, ns, ns.getConf(), tableConf.getCryptoService())
-          .withTableConfiguration(tableConf).seekToBeginning().build();
-
-      try {
-        if (!reader.hasTop()) {
-          // file is empty, so there is no last key
-          continue;
-        }
-
-        Key key = reader.getLastKey();
-
-        if (lastKey == null || key.compareTo(lastKey) > 0) {
-          lastKey = key;
-        }
-      } finally {
-        try {
-          if (reader != null) {
-            reader.close();
-          }
-        } catch (IOException e) {
-          log.error("{}", e.getMessage(), e);
-        }
-      }
-    }
-
-    return lastKey;
-
-  }
-
-  /**
-   * Convert TabletFiles to Strings in case we need to reduce number of files. The temporary files
-   * used will have irregular paths that don't conform to TabletFile verification.
-   */
-  public static Collection<String> toPathStrings(Collection<ReferencedTabletFile> files) {
-    return files.stream().map(ReferencedTabletFile::getNormalizedPathStr)
-        .collect(Collectors.toList());
-  }

Review Comment:
   Did all of this code move somewhere else? I assume it, or a replacement, is still needed.



##########
server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java:
##########
@@ -663,7 +662,7 @@ private int assignedOrHosted(Map<TableId,TableCounts> last) {
     return result;
   }
 
-  // ELASITICITY_TODO: Remove
+  // ELASITICITY_TODO: Remove??

Review Comment:
   If this is no longer called, which I think it isn't, then we can remove.



##########
server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java:
##########
@@ -759,13 +759,16 @@ private void fetchScans() {
 
   private void fetchCompactions() {
     ServerContext context = getContext();
+
     for (String server : context.instanceOperations().getTabletServers()) {
       final HostAndPort parsedServer = HostAndPort.fromString(server);
       Client tserver = null;
       try {
         tserver = ThriftUtil.getClient(ThriftClientTypes.TABLET_SERVER, parsedServer, context);
-        var compacts = tserver.getActiveCompactions(null, context.rpcCreds());
-        allCompactions.put(parsedServer, new CompactionStats(compacts));
+        // ELASTICITY_TODO tservers no longer have any compaction information, following code was

Review Comment:
   Need to create a follow-on issue, if one does not exist, to figure out how to display compaction information now. There is a page for external compactions, but it should likely be promoted to a more prominent position. It also probably needs some summarization as to how many compactions are occurring per table.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org