CommitStreamSetObjectRequest buildSplitRequest(List<StreamMetadata> streamMetadataList,
        S3ObjectMetadata objectToSplit) throws CompletionException {
        List<CompletableFuture<StreamObject>> cfs = new ArrayList<>();
        boolean status = splitStreamSetObject(objectToSplit, cfs);
        if (!status) {
            logger.error("Force split object {} failed, no stream object generated", objectToSplit.objectId());
            return null;
        }

        CommitStreamSetObjectRequest request = new CommitStreamSetObjectRequest();
        request.setObjectId(NOOP_OBJECT_ID);

        // wait for all force split objects to complete
        synchronized (this) {
            if (!running.get()) {
                logger.info("Compaction manager is shutdown, skip waiting for force splitting objects");
                return null;
            }
            forceSplitCf = CompletableFuture.allOf(cfs.toArray(new CompletableFuture[0]));
        }
        try {
            forceSplitCf.join();
        } catch (CancellationException exception) {
            logger.info("Force split objects cancelled");
            return null;
        }
        forceSplitCf = null;
        cfs.stream().map(e -> {
            try {
                return e.join();
            } catch (Exception ignored) {
                return null;
            }
        }).filter(Objects::nonNull).forEach(request::addStreamObject);

        request.setCompactedObjectIds(Collections.singletonList(objectToSplit.objectId()));
        if (isSanityCheckFailed(streamMetadataList, request)) {
            logger.error("Sanity check failed, force split result is illegal");
            return null;
        }

        return request;
    }
Split specified stream set object into stream objects.

@param objectMetadata     stream set object to split
@param cfs                List of CompletableFuture of StreamObject
@return true if split succeed, false otherwise
s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java