Search in sources :

Example 1 with DrainingExecutorCompletionService

use of org.commonjava.cdi.util.weft.DrainingExecutorCompletionService in project indy by Commonjava.

the class PromotionManager method runPathPromotions.

private PathsPromoteResult runPathPromotions(final PathsPromoteRequest request, final Set<String> pending, final List<Transfer> contents, final ValidationResult validation) {
    long begin = System.currentTimeMillis();
    PromotionHelper.PromotionRepoRetrievalResult checkResult = promotionHelper.checkAndRetrieveSourceAndTargetRepos(request);
    if (checkResult.hasErrors()) {
        return new PathsPromoteResult(request, pending, emptySet(), emptySet(), StringUtils.join(checkResult.errors, "\n"), validation);
    }
    final ArtifactStore targetStore = checkResult.targetStore;
    StoreKey targetKey = targetStore.getKey();
    logger.info("Run promotion from: {} to: {}, paths: {}", request.getSource(), targetKey, pending);
    Set<Group> affectedGroups;
    try {
        affectedGroups = storeManager.query().getGroupsAffectedBy(targetKey);
        logger.info("Calculate affected groups, target: {}, affected-groups: {}", targetKey, affectedGroups);
    } catch (IndyDataException e) {
        logger.error("Get affected groups failed", e);
        return new PathsPromoteResult(request, pending, emptySet(), emptySet(), "Get affected groups failed, " + e.getMessage(), validation);
    }
    DrainingExecutorCompletionService<Set<PathTransferResult>> svc = new DrainingExecutorCompletionService<>(transferService);
    int corePoolSize = transferService.getCorePoolSize();
    int size = contents.size();
    int batchSize = getParalleledBatchSize(size, corePoolSize);
    logger.info("Execute parallel on collection, size: {}, batch: {}", size, batchSize);
    Collection<Collection<Transfer>> batches = batch(contents, batchSize);
    final List<String> errors = new ArrayList<>();
    try {
        detectOverloadVoid(() -> batches.forEach(batch -> svc.submit(newPathPromotionsJob(batch, targetStore, request, affectedGroups))));
    } catch (IndyWorkflowException e) {
        // might be PoolOverloadException. Log it and continue to revert any completed paths
        String msg = String.format("Failed to submit all path promotion jobs. Error: %s", e.toString());
        logger.error(msg, e);
        errors.add(msg);
    }
    final Set<PathTransferResult> results = new HashSet<>();
    try {
        svc.drain(results::addAll);
    } catch (InterruptedException | ExecutionException e) {
        String msg = String.format("Error waiting for promotion of: %s to: %s", request.getSource(), request.getTarget());
        logger.error(msg, e);
        errors.add(msg);
    }
    final Set<String> completed = new HashSet<>();
    final Set<String> skipped = new HashSet<>();
    results.forEach(result -> {
        if (result.error != null) {
            errors.add(result.error);
        } else if (result.skipped) {
            skipped.add(result.path);
        } else {
            completed.add(result.path);
        }
    });
    PathsPromoteResult result;
    if (!errors.isEmpty()) {
        List<String> rollbackErrors = promotionHelper.deleteFromStore(completed, targetStore);
        errors.addAll(rollbackErrors);
        result = new PathsPromoteResult(request, pending, emptySet(), emptySet(), StringUtils.join(errors, "\n"), validation);
    } else {
        result = new PathsPromoteResult(request, emptySet(), completed, skipped, null, validation);
        final String name = String.format("PromoteNFCClean-method(%s)-source(%s)-target(%s)", "runPathPromotions", request.getSource(), targetStore.getKey());
        final String context = String.format("Class: %s, method: %s, source: %s, target: %s", this.getClass().getName(), "runPathPromotions", request.getSource(), targetStore.getKey());
        storeManager.asyncGroupAffectedBy(new StoreDataManager.ContextualTask(name, context, () -> promotionHelper.clearStoreNFC(completed, targetStore, affectedGroups)));
        if (request.isFireEvents()) {
            fireEvent(promoteCompleteEvent, new PathsPromoteCompleteEvent(result));
        }
    }
    logger.info("Promotion completed, promotionId: {}, timeInSeconds: {}", request.getPromotionId(), timeInSeconds(begin));
    return result;
}
Also used : GroupMembershipLocks(org.commonjava.indy.core.inject.GroupMembershipLocks) ValidationResult(org.commonjava.indy.promote.model.ValidationResult) ChangeSummary(org.commonjava.indy.audit.ChangeSummary) LoggerFactory(org.slf4j.LoggerFactory) PathsPromoteCompleteEvent(org.commonjava.indy.promote.change.event.PathsPromoteCompleteEvent) StringUtils(org.apache.commons.lang3.StringUtils) SpecialPathInfo(org.commonjava.maven.galley.model.SpecialPathInfo) WeftExecutorService(org.commonjava.cdi.util.weft.WeftExecutorService) Batcher.getParalleledBatchSize(org.commonjava.indy.promote.util.Batcher.getParalleledBatchSize) Future(java.util.concurrent.Future) WeftManaged(org.commonjava.cdi.util.weft.WeftManaged) Map(java.util.Map) StoreKey(org.commonjava.indy.model.core.StoreKey) PathsPromoteRequest(org.commonjava.indy.promote.model.PathsPromoteRequest) PromotionCallbackHelper(org.commonjava.indy.promote.callback.PromotionCallbackHelper) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) StoreType(org.commonjava.indy.model.core.StoreType) Set(java.util.Set) ExceptionUtils.getStackTrace(org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace) Collectors(java.util.stream.Collectors) ContentManager(org.commonjava.indy.content.ContentManager) List(java.util.List) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) PromotionHelper.throwProperException(org.commonjava.indy.promote.data.PromotionHelper.throwProperException) GroupPromoteRequest(org.commonjava.indy.promote.model.GroupPromoteRequest) ApplicationScoped(javax.enterprise.context.ApplicationScoped) StoreType.hosted(org.commonjava.indy.model.core.StoreType.hosted) IndyDataException(org.commonjava.indy.data.IndyDataException) PoolUtils.detectOverloadVoid(org.commonjava.indy.core.ctl.PoolUtils.detectOverloadVoid) AFFECTED_GROUPS(org.commonjava.indy.data.StoreDataManager.AFFECTED_GROUPS) TARGET_STORE(org.commonjava.indy.data.StoreDataManager.TARGET_STORE) ValidationRequest(org.commonjava.indy.promote.validate.model.ValidationRequest) Locker(org.commonjava.cdi.util.weft.Locker) Callable(java.util.concurrent.Callable) Batcher.batch(org.commonjava.indy.promote.util.Batcher.batch) AtomicReference(java.util.concurrent.atomic.AtomicReference) UPLOAD(org.commonjava.maven.galley.model.TransferOperation.UPLOAD) ThreadContext(org.commonjava.cdi.util.weft.ThreadContext) Group(org.commonjava.indy.model.core.Group) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) HashSet(java.util.HashSet) Transfer(org.commonjava.maven.galley.model.Transfer) Measure(org.commonjava.o11yphant.metrics.annotation.Measure) ExecutorConfig(org.commonjava.cdi.util.weft.ExecutorConfig) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) PromotionValidator(org.commonjava.indy.promote.validate.PromotionValidator) EventUtils.fireEvent(org.commonjava.indy.change.EventUtils.fireEvent) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) DownloadManager(org.commonjava.indy.content.DownloadManager) Event(javax.enterprise.event.Event) PoolUtils.detectOverload(org.commonjava.indy.core.ctl.PoolUtils.detectOverload) PromoteCompleteEvent(org.commonjava.indy.promote.change.event.PromoteCompleteEvent) PromotionHelper.timeInMillSeconds(org.commonjava.indy.promote.data.PromotionHelper.timeInMillSeconds) GroupPromoteResult(org.commonjava.indy.promote.model.GroupPromoteResult) PromotionValidationException(org.commonjava.indy.promote.validate.PromotionValidationException) Logger(org.slf4j.Logger) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) Collections.emptySet(java.util.Collections.emptySet) PromoteConfig(org.commonjava.indy.promote.conf.PromoteConfig) SpecialPathManager(org.commonjava.maven.galley.spi.io.SpecialPathManager) IOException(java.io.IOException) PathsPromoteResult(org.commonjava.indy.promote.model.PathsPromoteResult) ValuePipe(org.commonjava.indy.util.ValuePipe) NotFoundCache(org.commonjava.maven.galley.spi.nfc.NotFoundCache) ExecutionException(java.util.concurrent.ExecutionException) IGNORE_READONLY(org.commonjava.indy.data.StoreDataManager.IGNORE_READONLY) HostedRepository(org.commonjava.indy.model.core.HostedRepository) PromotionHelper.timeInSeconds(org.commonjava.indy.promote.data.PromotionHelper.timeInSeconds) RequestContextHelper(org.commonjava.indy.util.RequestContextHelper) StoreDataManager(org.commonjava.indy.data.StoreDataManager) InputStream(java.io.InputStream) Group(org.commonjava.indy.model.core.Group) Set(java.util.Set) HashSet(java.util.HashSet) Collections.emptySet(java.util.Collections.emptySet) PathsPromoteResult(org.commonjava.indy.promote.model.PathsPromoteResult) ArrayList(java.util.ArrayList) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) StoreDataManager(org.commonjava.indy.data.StoreDataManager) ExecutionException(java.util.concurrent.ExecutionException) HashSet(java.util.HashSet) StoreKey(org.commonjava.indy.model.core.StoreKey) IndyDataException(org.commonjava.indy.data.IndyDataException) PathsPromoteCompleteEvent(org.commonjava.indy.promote.change.event.PathsPromoteCompleteEvent) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) Collection(java.util.Collection)

Example 2 with DrainingExecutorCompletionService

use of org.commonjava.cdi.util.weft.DrainingExecutorCompletionService in project indy by Commonjava.

the class PromotionValidator method validate.

/**
 * NOTE: As of Indy 1.2.6, ValidationRequest passed back to enable further post-processing, especially of promotion
 * paths, after promotion takes place. This enables us to avoid re-executing recursive path discovery, for instance.
 *
 * @param request
 * @param result
 * @param baseUrl
 * @return
 * @throws PromotionValidationException
 * @throws IndyWorkflowException
 */
@Measure
public ValidationRequest validate(PromoteRequest request, ValidationResult result, String baseUrl) throws PromotionValidationException, IndyWorkflowException {
    ValidationRuleSet set = validationsManager.getRuleSetMatching(request.getTargetKey());
    ArtifactStore source;
    try {
        source = storeDataMgr.getArtifactStore(request.getSource());
    } catch (IndyDataException e) {
        throw new PromotionValidationException(String.format("Failed to retrieve source ArtifactStore: %s for validation", request.getSource()), e);
    }
    if (set != null) {
        result.setRuleSet(set.getName());
        RequestContextHelper.setContext(PROMOTION_VALIDATION_RULE_SET, set.getName());
        logger.debug("Running validation rule-set for promotion: {}", set.getName());
        List<String> ruleNames = set.getRuleNames();
        if (ruleNames != null && !ruleNames.isEmpty()) {
            final ArtifactStore store = getRequestStore(request, baseUrl);
            final ValidationRequest req = new ValidationRequest(request, set, validationTools, store);
            try {
                DrainingExecutorCompletionService<Exception> svc = new DrainingExecutorCompletionService<>(validateService);
                detectOverloadVoid(() -> {
                    for (String ruleRef : ruleNames) {
                        svc.submit(() -> {
                            RequestContextHelper.setContext(PROMOTION_VALIDATION_RULE, ruleRef);
                            Exception err = null;
                            try {
                                executeValidationRule(ruleRef, req, result, request);
                            } catch (Exception e) {
                                err = e;
                            } finally {
                                RequestContextHelper.clearContext(PROMOTION_VALIDATION_RULE);
                            }
                            return err;
                        });
                    }
                });
                List<String> errors = new ArrayList<>();
                svc.drain(err -> {
                    if (err != null) {
                        logger.error("Promotion validation failure", err);
                        errors.add(err.getMessage());
                    }
                });
                if (!errors.isEmpty()) {
                    throw new PromotionValidationException(format("Failed to do promotion validation: \n\n%s", join(errors, "\n")));
                }
            } catch (InterruptedException e) {
                throw new PromotionValidationException("Failed to do promotion validation: validation execution has been interrupted ", e);
            } catch (ExecutionException e) {
                throw new PromotionValidationException("Failed to execute promotion validations", e);
            } finally {
                if (needTempRepo(request)) {
                    try {
                        final String changeSum = format("Removes the temp remote repo [%s] after promote operation.", store);
                        storeDataMgr.deleteArtifactStore(store.getKey(), new ChangeSummary(ChangeSummary.SYSTEM_USER, changeSum), new EventMetadata().set(ContentManager.SUPPRESS_EVENTS, true));
                        Transfer root = downloadManager.getStoreRootDirectory(store);
                        if (root.exists()) {
                            root.delete(false);
                        }
                        logger.debug("Promotion temporary repo {} has been deleted for {}", store.getKey(), request.getSource());
                    } catch (IndyDataException | IOException e) {
                        logger.warn("Temporary promotion validation repository was NOT removed correctly.", e);
                    }
                }
            }
            return req;
        } else {
            logger.info("No validation rules are defined for: {}", request.getTargetKey());
            return new ValidationRequest(request, set, validationTools, source);
        }
    } else {
        logger.info("No validation rule-sets are defined for: {}", request.getTargetKey());
        return new ValidationRequest(request, set, validationTools, source);
    }
}
Also used : ValidationRequest(org.commonjava.indy.promote.validate.model.ValidationRequest) ArrayList(java.util.ArrayList) IOException(java.io.IOException) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) IndyDataException(org.commonjava.indy.data.IndyDataException) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) IndyDataException(org.commonjava.indy.data.IndyDataException) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) Transfer(org.commonjava.maven.galley.model.Transfer) ValidationRuleSet(org.commonjava.indy.promote.model.ValidationRuleSet) ExecutionException(java.util.concurrent.ExecutionException) ChangeSummary(org.commonjava.indy.audit.ChangeSummary) Measure(org.commonjava.o11yphant.metrics.annotation.Measure)

Example 3 with DrainingExecutorCompletionService

use of org.commonjava.cdi.util.weft.DrainingExecutorCompletionService in project indy by Commonjava.

the class StoreContentListener method clearPaths.

/**
 * List the paths in target store and clean up the paths in affected groups.
 *
 * If groups are given, use them (for group update since all members share same group hierarchy). Otherwise,
 * query the affected groups (for store deletion and dis/enable event).
 */
private void clearPaths(final Set<StoreKey> keys, Predicate<? super String> pathFilter, final Set<Group> groups, final boolean deleteOriginPath) {
    // NOSSUP-76 we still need to use synchronized/drain way to clean the paths now, because sometimes the new used metadata
    // not updated in time when some builds want to consume them as the obsolete metadata not cleared under
    // async way.
    DrainingExecutorCompletionService<Integer> clearService = new DrainingExecutorCompletionService<>(cleanupExecutor);
    keys.forEach(key -> {
        ArtifactStore origin;
        try {
            origin = storeDataManager.getArtifactStore(key);
        } catch (IndyDataException e) {
            logger.error("Failed to retrieve store: " + key, e);
            return;
        }
        Set<Group> affected = groups;
        if (affected == null) {
            try {
                affected = (storeDataManager.query().getGroupsAffectedBy(key));
            } catch (IndyDataException e) {
                logger.error("Failed to retrieve groups affected by: " + key, e);
                return;
            }
        }
        logger.debug("Submit clean job for origin: {}", origin);
        final Set<Group> affectedGroups = affected;
        clearService.submit(clearPathsProcessor(origin, pathFilter, affectedGroups, deleteOriginPath));
    });
    drainAndCount(clearService, "stores: " + keys);
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) IndyDataException(org.commonjava.indy.data.IndyDataException) Group(org.commonjava.indy.model.core.Group) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService)

Example 4 with DrainingExecutorCompletionService

use of org.commonjava.cdi.util.weft.DrainingExecutorCompletionService in project indy by Commonjava.

the class DefaultDirectContentAccess method listRaw.

@Override
public Map<String, List<StoreResource>> listRaw(ArtifactStore store, List<String> parentPathList, EventMetadata eventMetadata) throws IndyWorkflowException {
    DrainingExecutorCompletionService<StoreListingResult> svc = new DrainingExecutorCompletionService<>(contentAccessService);
    Logger logger = LoggerFactory.getLogger(getClass());
    detectOverloadVoid(() -> {
        for (final String path : parentPathList) {
            logger.trace("Requesting listing of {} in {}", path, store);
            svc.submit(() -> {
                addFieldToActiveSpan("storekey", store.getKey().toString());
                addFieldToActiveSpan("path", path);
                addFieldToActiveSpan("activity", "listRaw");
                logger.trace("Starting listing of {} in {}", path, store);
                List<StoreResource> listRaw = listRaw(store, path, eventMetadata);
                logger.trace("Listing of {} in {} finished", path, store);
                return new StoreListingResult(path, listRaw);
            });
        }
    });
    final Map<String, List<StoreResource>> result = new HashMap<>();
    try {
        svc.drain(slr -> result.put(slr.path, slr.listing));
    } catch (InterruptedException ex) {
        throw new IndyWorkflowException("Listing retrieval in %s was interrupted", ex, store);
    } catch (ExecutionException ex) {
        throw new IndyWorkflowException("There was an error in listing retrieval for %s: %s", ex, store, ex);
    }
    return result;
}
Also used : HashMap(java.util.HashMap) Logger(org.slf4j.Logger) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) StoreResource(org.commonjava.indy.content.StoreResource) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) ArrayList(java.util.ArrayList) List(java.util.List) ExecutionException(java.util.concurrent.ExecutionException)

Example 5 with DrainingExecutorCompletionService

use of org.commonjava.cdi.util.weft.DrainingExecutorCompletionService in project indy by Commonjava.

the class MavenMetadataGenerator method mergeMissing.

private MetadataIncrementalResult mergeMissing(final Group group, final MetadataIncrementalResult incrementalResult, final String toMergePath, String description, BiFunction<ArtifactStore, String, Callable<MetadataResult>> func) throws IndyWorkflowException {
    Set<ArtifactStore> missing = incrementalResult.missing;
    Metadata master = incrementalResult.result;
    logger.debug("Merge member metadata for {}, {}, missing: {}, size: {}", group.getKey(), description, missing, missing.size());
    DrainingExecutorCompletionService<MetadataResult> svc = new DrainingExecutorCompletionService<>(mavenMDGeneratorService);
    detectOverloadVoid(() -> missing.forEach(store -> svc.submit(func.apply(store, toMergePath))));
    // return stores failed download
    Set<ArtifactStore> resultingMissing = new HashSet<>();
    Set<StoreKey> included = new HashSet<>();
    try {
        svc.drain(mr -> {
            if (mr != null) {
                if (mr.missing) {
                    resultingMissing.add(mr.store);
                } else {
                    included.add(mr.store.getKey());
                    merger.merge(master, mr.metadata, group, toMergePath);
                    putToMetadataCache(mr.store.getKey(), toMergePath, new MetadataInfo(mr.metadata));
                }
            }
        });
    } catch (InterruptedException e) {
        logger.debug("Interrupted while merging " + description + " member metadata.");
    } catch (ExecutionException e) {
        throw new IndyWorkflowException("Failed to merge downloaded " + description + " member metadata.", e);
    }
    return new MetadataIncrementalResult(resultingMissing, included, master);
}
Also used : HTTP_METADATA_EXT(org.commonjava.maven.galley.io.SpecialPathConstants.HTTP_METADATA_EXT) Date(java.util.Date) BiFunction(java.util.function.BiFunction) MergedContentAction(org.commonjava.indy.content.MergedContentAction) PathUtils.normalize(org.commonjava.maven.galley.util.PathUtils.normalize) StringUtils(org.apache.commons.lang3.StringUtils) WeftExecutorService(org.commonjava.cdi.util.weft.WeftExecutorService) GROUP_METADATA_GENERATED(org.commonjava.indy.core.content.group.GroupMergeHelper.GROUP_METADATA_GENERATED) WeftManaged(org.commonjava.cdi.util.weft.WeftManaged) TransferOperation(org.commonjava.maven.galley.model.TransferOperation) Document(org.w3c.dom.Document) TraceManager.addFieldToActiveSpan(org.commonjava.o11yphant.trace.TraceManager.addFieldToActiveSpan) Map(java.util.Map) StoreKey(org.commonjava.indy.model.core.StoreKey) Instance(javax.enterprise.inject.Instance) GROUP_METADATA_EXISTS(org.commonjava.indy.core.content.group.GroupMergeHelper.GROUP_METADATA_EXISTS) ArtifactPathInfo(org.commonjava.atlas.maven.ident.util.ArtifactPathInfo) GroupMergeHelper(org.commonjava.indy.core.content.group.GroupMergeHelper) MavenMetadataMerger(org.commonjava.indy.pkg.maven.content.group.MavenMetadataMerger) ConcreteResource(org.commonjava.maven.galley.model.ConcreteResource) StoreType(org.commonjava.indy.model.core.StoreType) Set(java.util.Set) Collectors(java.util.stream.Collectors) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) Metadata(org.apache.maven.artifact.repository.metadata.Metadata) LOCAL_SNAPSHOT_VERSION_PART(org.commonjava.atlas.maven.ident.util.SnapshotUtils.LOCAL_SNAPSHOT_VERSION_PART) PostConstruct(javax.annotation.PostConstruct) XMLInfrastructure(org.commonjava.maven.galley.maven.parse.XMLInfrastructure) DirectContentAccess(org.commonjava.indy.content.DirectContentAccess) PoolUtils.detectOverloadVoid(org.commonjava.indy.core.ctl.PoolUtils.detectOverloadVoid) Plugin(org.apache.maven.artifact.repository.metadata.Plugin) ByteArrayOutputStream(java.io.ByteArrayOutputStream) MetadataXpp3Writer(org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Writer) Locker(org.commonjava.cdi.util.weft.Locker) MavenMetadataProvider(org.commonjava.indy.pkg.maven.content.group.MavenMetadataProvider) HashMap(java.util.HashMap) Callable(java.util.concurrent.Callable) AtomicReference(java.util.concurrent.atomic.AtomicReference) VersionUtils(org.commonjava.atlas.maven.ident.util.VersionUtils) Group(org.commonjava.indy.model.core.Group) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) HashSet(java.util.HashSet) SnapshotVersion(org.apache.maven.artifact.repository.metadata.SnapshotVersion) Transfer(org.commonjava.maven.galley.model.Transfer) Measure(org.commonjava.o11yphant.metrics.annotation.Measure) ExecutorConfig(org.commonjava.cdi.util.weft.ExecutorConfig) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) TypeAndClassifier(org.commonjava.atlas.maven.ident.ref.TypeAndClassifier) GalleyMavenXMLException(org.commonjava.maven.galley.maven.parse.GalleyMavenXMLException) PathUtils.parentPath(org.commonjava.maven.galley.util.PathUtils.parentPath) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) SnapshotPart(org.commonjava.atlas.maven.ident.version.part.SnapshotPart) MetadataXpp3Reader(org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader) OutputStream(java.io.OutputStream) Versioning(org.apache.maven.artifact.repository.metadata.Versioning) LocationUtils(org.commonjava.indy.util.LocationUtils) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) UTF_8(java.nio.charset.StandardCharsets.UTF_8) TraceManager(org.commonjava.o11yphant.trace.TraceManager) IOUtils.closeQuietly(org.apache.commons.io.IOUtils.closeQuietly) IOException(java.io.IOException) SnapshotUtils.generateUpdateTimestamp(org.commonjava.atlas.maven.ident.util.SnapshotUtils.generateUpdateTimestamp) SimpleTypeAndClassifier(org.commonjava.atlas.maven.ident.ref.SimpleTypeAndClassifier) SnapshotUtils(org.commonjava.atlas.maven.ident.util.SnapshotUtils) NotFoundCache(org.commonjava.maven.galley.spi.nfc.NotFoundCache) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) Element(org.w3c.dom.Element) StringReader(java.io.StringReader) Paths(java.nio.file.Paths) TypeMapper(org.commonjava.maven.galley.maven.spi.type.TypeMapper) StoreResource(org.commonjava.indy.content.StoreResource) SnapshotUtils.getCurrentTimestamp(org.commonjava.atlas.maven.ident.util.SnapshotUtils.getCurrentTimestamp) TypeMapping(org.commonjava.maven.galley.model.TypeMapping) SingleVersion(org.commonjava.atlas.maven.ident.version.SingleVersion) AbstractMergedContentGenerator(org.commonjava.indy.core.content.AbstractMergedContentGenerator) Collections(java.util.Collections) StoreDataManager(org.commonjava.indy.data.StoreDataManager) InputStream(java.io.InputStream) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) Metadata(org.apache.maven.artifact.repository.metadata.Metadata) StoreKey(org.commonjava.indy.model.core.StoreKey) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) ExecutionException(java.util.concurrent.ExecutionException) HashSet(java.util.HashSet)

Aggregations

DrainingExecutorCompletionService (org.commonjava.cdi.util.weft.DrainingExecutorCompletionService)9 ArrayList (java.util.ArrayList)8 ExecutionException (java.util.concurrent.ExecutionException)8 IndyWorkflowException (org.commonjava.indy.IndyWorkflowException)7 ArtifactStore (org.commonjava.indy.model.core.ArtifactStore)7 EventMetadata (org.commonjava.maven.galley.event.EventMetadata)7 List (java.util.List)6 Set (java.util.Set)5 Collectors (java.util.stream.Collectors)5 Inject (javax.inject.Inject)5 ExecutorConfig (org.commonjava.cdi.util.weft.ExecutorConfig)5 WeftExecutorService (org.commonjava.cdi.util.weft.WeftExecutorService)5 WeftManaged (org.commonjava.cdi.util.weft.WeftManaged)5 PoolUtils.detectOverloadVoid (org.commonjava.indy.core.ctl.PoolUtils.detectOverloadVoid)5 IndyDataException (org.commonjava.indy.data.IndyDataException)5 StoreDataManager (org.commonjava.indy.data.StoreDataManager)5 IOException (java.io.IOException)4 Group (org.commonjava.indy.model.core.Group)4 Transfer (org.commonjava.maven.galley.model.Transfer)4 Measure (org.commonjava.o11yphant.metrics.annotation.Measure)4