Search in sources :

Example 1 with ImmutablePair

use of io.cdap.cdap.common.utils.ImmutablePair in project cdap by caskdata.

the class DatasetMetadataStorage method search.

@Override
public SearchResponse search(SearchRequest request) {
    Cursor cursor = request.getCursor() != null && !request.getCursor().isEmpty() ? Cursor.fromString(request.getCursor()) : null;
    Set<String> namespaces = cursor == null ? request.getNamespaces() : cursor.getNamespaces();
    ImmutablePair<NamespaceId, Set<EntityScope>> namespaceAndScopes = determineNamespaceAndScopes(namespaces);
    CursorAndOffsetInfo cursorOffsetAndLimits = determineCursorOffsetAndLimits(request, cursor);
    String query = cursor != null ? cursor.getQuery() : request.getQuery() == null || request.getQuery().isEmpty() ? "*" : request.getQuery();
    Set<String> types = cursor != null ? cursor.getTypes() : request.getTypes();
    types = types == null ? Collections.emptySet() : types;
    Sorting sorting = cursor == null ? request.getSorting() : cursor.getSorting() == null ? null : Sorting.of(cursor.getSorting());
    SortInfo sortInfo = sorting == null ? SortInfo.DEFAULT : new SortInfo(sorting.getKey(), SortInfo.SortOrder.valueOf(sorting.getOrder().name()));
    boolean showHidden = cursor != null ? cursor.isShowHidden() : request.isShowHidden();
    MetadataScope scope = cursor != null ? cursor.getScope() : request.getScope();
    MetadataSearchResponse response = search(new io.cdap.cdap.data2.metadata.dataset.SearchRequest(namespaceAndScopes.getFirst(), query, types, sortInfo, cursorOffsetAndLimits.getOffsetToRequest(), cursorOffsetAndLimits.getLimitToRequest(), request.isCursorRequested() ? 1 : 0, cursorOffsetAndLimits.getCursor(), showHidden, namespaceAndScopes.getSecond()), scope);
    // translate results back and limit them to at most what was requested (see above where we add 1)
    int limitToRespond = cursorOffsetAndLimits.getLimitToRespond();
    int offsetToRespond = cursorOffsetAndLimits.getOffsetToRespond();
    List<MetadataRecord> results = response.getResults().stream().limit(limitToRespond).map(record -> {
        Metadata metadata = Metadata.EMPTY;
        for (Map.Entry<MetadataScope, io.cdap.cdap.api.metadata.Metadata> entry : record.getMetadata().entrySet()) {
            Metadata toAdd = new Metadata(entry.getKey(), entry.getValue().getTags(), entry.getValue().getProperties());
            metadata = mergeDisjointMetadata(metadata, toAdd);
        }
        return new MetadataRecord(record.getMetadataEntity(), metadata);
    }).collect(Collectors.toList());
    Cursor newCursor = null;
    if (response.getCursors() != null && !response.getCursors().isEmpty()) {
        String actualCursor = response.getCursors().get(0);
        if (cursor != null) {
            // the new cursor's offset is the previous cursor's offset plus the number of results
            newCursor = new Cursor(cursor, cursor.getOffset() + results.size(), actualCursor);
        } else {
            newCursor = new Cursor(offsetToRespond + results.size(), limitToRespond, showHidden, scope, namespaces, types, sorting == null ? null : sorting.toString(), actualCursor, query);
        }
    }
    // adjust the total results by the difference of requested offset and the true offset that we respond back
    int totalResults = offsetToRespond - cursorOffsetAndLimits.getOffsetToRequest() + response.getTotal();
    return new SearchResponse(request, newCursor == null ? null : newCursor.toString(), offsetToRespond, limitToRespond, totalResults, results);
}
Also used : MetadataSearchResponse(io.cdap.cdap.proto.metadata.MetadataSearchResponse) ImmutablePair(io.cdap.cdap.common.utils.ImmutablePair) MetadataDirective(io.cdap.cdap.spi.metadata.MetadataDirective) NamespaceId(io.cdap.cdap.proto.id.NamespaceId) Inject(com.google.inject.Inject) HashMap(java.util.HashMap) USER(io.cdap.cdap.api.metadata.MetadataScope.USER) MetadataChange(io.cdap.cdap.spi.metadata.MetadataChange) MetadataStorage(io.cdap.cdap.spi.metadata.MetadataStorage) HashSet(java.util.HashSet) TAG(io.cdap.cdap.spi.metadata.MetadataKind.TAG) ScopedNameOfKind(io.cdap.cdap.spi.metadata.ScopedNameOfKind) Metadata(io.cdap.cdap.spi.metadata.Metadata) Map(java.util.Map) SearchRequest(io.cdap.cdap.spi.metadata.SearchRequest) MetadataEntity(io.cdap.cdap.api.metadata.MetadataEntity) MetadataMutation(io.cdap.cdap.spi.metadata.MetadataMutation) Read(io.cdap.cdap.spi.metadata.Read) EnumSet(java.util.EnumSet) Sorting(io.cdap.cdap.spi.metadata.Sorting) SortInfo(io.cdap.cdap.data2.metadata.dataset.SortInfo) TransactionSystemClient(org.apache.tephra.TransactionSystemClient) PROPERTY(io.cdap.cdap.spi.metadata.MetadataKind.PROPERTY) ImmutableMap(com.google.common.collect.ImmutableMap) Cursor(io.cdap.cdap.common.metadata.Cursor) SYSTEM(io.cdap.cdap.api.metadata.MetadataScope.SYSTEM) Set(java.util.Set) SearchResponse(io.cdap.cdap.spi.metadata.SearchResponse) IOException(java.io.IOException) MetadataKind(io.cdap.cdap.spi.metadata.MetadataKind) ScopedName(io.cdap.cdap.spi.metadata.ScopedName) Maps(com.google.common.collect.Maps) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) List(java.util.List) EntityScope(io.cdap.cdap.proto.EntityScope) MetadataScope(io.cdap.cdap.api.metadata.MetadataScope) Named(com.google.inject.name.Named) Constants(io.cdap.cdap.common.conf.Constants) VisibleForTesting(com.google.common.annotations.VisibleForTesting) DatasetDefinition(io.cdap.cdap.api.dataset.DatasetDefinition) MetadataRecord(io.cdap.cdap.spi.metadata.MetadataRecord) MutationOptions(io.cdap.cdap.spi.metadata.MutationOptions) MetadataDataset(io.cdap.cdap.data2.metadata.dataset.MetadataDataset) Collections(java.util.Collections) HashSet(java.util.HashSet) EnumSet(java.util.EnumSet) Set(java.util.Set) Metadata(io.cdap.cdap.spi.metadata.Metadata) Cursor(io.cdap.cdap.common.metadata.Cursor) MetadataRecord(io.cdap.cdap.spi.metadata.MetadataRecord) MetadataScope(io.cdap.cdap.api.metadata.MetadataScope) MetadataSearchResponse(io.cdap.cdap.proto.metadata.MetadataSearchResponse) Sorting(io.cdap.cdap.spi.metadata.Sorting) SortInfo(io.cdap.cdap.data2.metadata.dataset.SortInfo) MetadataSearchResponse(io.cdap.cdap.proto.metadata.MetadataSearchResponse) SearchResponse(io.cdap.cdap.spi.metadata.SearchResponse) NamespaceId(io.cdap.cdap.proto.id.NamespaceId)

Example 2 with ImmutablePair

use of io.cdap.cdap.common.utils.ImmutablePair in project cdap by caskdata.

the class ArtifactStore method addPluginsInRangeToMap.

private void addPluginsInRangeToMap(final NamespaceId namespace, List<Id.Artifact> parentArtifacts, Iterator<StructuredRow> iterator, SortedMap<ArtifactDescriptor, PluginClass> plugins, @Nullable Predicate<io.cdap.cdap.proto.id.ArtifactId> range, int limit) {
    // if predicate is null,
    // filter out plugins whose artifacts are not in the system namespace and not in this namespace
    range = range != null ? range : input -> NamespaceId.SYSTEM.equals(input.getParent()) || input.getParent().equals(namespace);
    while (iterator.hasNext()) {
        StructuredRow row = iterator.next();
        ImmutablePair<ArtifactDescriptor, PluginData> pluginPair = getPlugin(row, range);
        if (pluginPair == null) {
            continue;
        }
        PluginData pluginData = pluginPair.getSecond();
        // filter out plugins that don't extend this version of the parent artifact
        for (Id.Artifact parentArtifactId : parentArtifacts) {
            if (pluginData.isUsableBy(parentArtifactId.toEntityId()) && isAllowed(pluginData.pluginClass)) {
                plugins.put(pluginPair.getFirst(), pluginData.pluginClass);
                break;
            }
        }
        if (limit < plugins.size()) {
            plugins.remove(plugins.lastKey());
        }
    }
}
Also used : Arrays(java.util.Arrays) ImmutablePair(io.cdap.cdap.common.utils.ImmutablePair) TransactionRunners(io.cdap.cdap.spi.data.transaction.TransactionRunners) NamespaceId(io.cdap.cdap.proto.id.NamespaceId) Spliterators(java.util.Spliterators) Inject(com.google.inject.Inject) StructuredRow(io.cdap.cdap.spi.data.StructuredRow) ArtifactClasses(io.cdap.cdap.api.artifact.ArtifactClasses) Fields(io.cdap.cdap.spi.data.table.field.Fields) GsonBuilder(com.google.gson.GsonBuilder) Gson(com.google.gson.Gson) ArtifactSortOrder(io.cdap.cdap.proto.artifact.ArtifactSortOrder) Map(java.util.Map) Field(io.cdap.cdap.spi.data.table.field.Field) URI(java.net.URI) Collector(java.util.stream.Collector) StoreDefinition(io.cdap.cdap.store.StoreDefinition) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Set(java.util.Set) ApplicationClass(io.cdap.cdap.api.artifact.ApplicationClass) StructuredTableContext(io.cdap.cdap.spi.data.StructuredTableContext) Collectors(java.util.stream.Collectors) PluginClass(io.cdap.cdap.api.plugin.PluginClass) BinaryOperator(java.util.function.BinaryOperator) Id(io.cdap.cdap.common.id.Id) List(java.util.List) TransactionRunner(io.cdap.cdap.spi.data.transaction.TransactionRunner) Optional(java.util.Optional) Constants(io.cdap.cdap.common.conf.Constants) ArtifactScope(io.cdap.cdap.api.artifact.ArtifactScope) ArtifactAlreadyExistsException(io.cdap.cdap.common.ArtifactAlreadyExistsException) SortedMap(java.util.SortedMap) SchemaTypeAdapter(io.cdap.cdap.internal.io.SchemaTypeAdapter) TransactionException(io.cdap.cdap.spi.data.transaction.TransactionException) Location(org.apache.twill.filesystem.Location) ArtifactRange(io.cdap.cdap.api.artifact.ArtifactRange) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) PluginNotExistsException(io.cdap.cdap.internal.app.runtime.plugin.PluginNotExistsException) StructuredTableId(io.cdap.cdap.spi.data.table.StructuredTableId) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) Locations(io.cdap.cdap.common.io.Locations) StreamSupport(java.util.stream.StreamSupport) LinkedHashSet(java.util.LinkedHashSet) Nullable(javax.annotation.Nullable) OutputStream(java.io.OutputStream) Iterator(java.util.Iterator) Files(java.nio.file.Files) Throwables(com.google.common.base.Throwables) Impersonator(io.cdap.cdap.security.impersonation.Impersonator) IOException(java.io.IOException) LocationFactory(org.apache.twill.filesystem.LocationFactory) Maps(com.google.common.collect.Maps) Schema(io.cdap.cdap.api.data.schema.Schema) CloseableIterator(io.cdap.cdap.api.dataset.lib.CloseableIterator) TableNotFoundException(io.cdap.cdap.spi.data.TableNotFoundException) File(java.io.File) MinMaxPriorityQueue(com.google.common.collect.MinMaxPriorityQueue) EntityImpersonator(io.cdap.cdap.security.impersonation.EntityImpersonator) AbstractMap(java.util.AbstractMap) Requirements(io.cdap.cdap.api.plugin.Requirements) ArtifactNotFoundException(io.cdap.cdap.common.ArtifactNotFoundException) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) TreeMap(java.util.TreeMap) ArtifactVersion(io.cdap.cdap.api.artifact.ArtifactVersion) StructuredTable(io.cdap.cdap.spi.data.StructuredTable) Range(io.cdap.cdap.spi.data.table.field.Range) NamespacePathLocator(io.cdap.cdap.common.namespace.NamespacePathLocator) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Comparator(java.util.Comparator) Collections(java.util.Collections) ArtifactId(io.cdap.cdap.api.artifact.ArtifactId) StructuredRow(io.cdap.cdap.spi.data.StructuredRow) NamespaceId(io.cdap.cdap.proto.id.NamespaceId) Id(io.cdap.cdap.common.id.Id) StructuredTableId(io.cdap.cdap.spi.data.table.StructuredTableId) ArtifactId(io.cdap.cdap.api.artifact.ArtifactId)

Example 3 with ImmutablePair

use of io.cdap.cdap.common.utils.ImmutablePair in project cdap by caskdata.

the class HBaseTable method setFilterIfNeeded.

private void setFilterIfNeeded(ScanBuilder scan, @Nullable Filter filter) {
    if (filter == null) {
        return;
    }
    if (filter instanceof FuzzyRowFilter) {
        FuzzyRowFilter fuzzyRowFilter = (FuzzyRowFilter) filter;
        List<Pair<byte[], byte[]>> fuzzyPairs = Lists.newArrayListWithExpectedSize(fuzzyRowFilter.getFuzzyKeysData().size());
        for (ImmutablePair<byte[], byte[]> pair : fuzzyRowFilter.getFuzzyKeysData()) {
            fuzzyPairs.add(Pair.newPair(pair.getFirst(), pair.getSecond()));
        }
        scan.setFilter(new org.apache.hadoop.hbase.filter.FuzzyRowFilter(fuzzyPairs));
    } else {
        throw new IllegalArgumentException("Unsupported filter: " + filter);
    }
}
Also used : FuzzyRowFilter(io.cdap.cdap.data2.dataset2.lib.table.FuzzyRowFilter) ImmutablePair(io.cdap.cdap.common.utils.ImmutablePair) Pair(org.apache.hadoop.hbase.util.Pair)

Example 4 with ImmutablePair

use of io.cdap.cdap.common.utils.ImmutablePair in project cdap by caskdata.

the class MetadataDataset method getFuzzyKeyFor.

private ImmutablePair<byte[], byte[]> getFuzzyKeyFor(MetadataEntity metadataEntity) {
    // We need to create fuzzy pairs to match the first part of the key containing metadataEntity
    MDSKey mdsKey = MetadataKey.createValueRowKey(metadataEntity, null);
    byte[] keyBytes = mdsKey.getKey();
    // byte array is automatically initialized to 0, which implies fixed match in fuzzy info
    // the row key after metadataEntity doesn't need to be a match.
    // Workaround for HBASE-15676, need to have at least one 1 in the fuzzy filter
    byte[] infoBytes = new byte[keyBytes.length + 1];
    infoBytes[infoBytes.length - 1] = 1;
    // the key array size and mask array size has to be equal so increase the size by 1
    return new ImmutablePair<>(Bytes.concat(keyBytes, new byte[1]), infoBytes);
}
Also used : ImmutablePair(io.cdap.cdap.common.utils.ImmutablePair) MDSKey(io.cdap.cdap.data2.dataset2.lib.table.MDSKey)

Example 5 with ImmutablePair

use of io.cdap.cdap.common.utils.ImmutablePair in project cdap by caskdata.

the class AppFabricTestBase method getAppDetails.

/**
 * Gets a list of {@link BatchApplicationDetail} from the give set of application version
 *
 * @param namespace the namespace to read from
 * @param appVersions list of appId and version pair.
 */
protected List<BatchApplicationDetail> getAppDetails(String namespace, Collection<ImmutablePair<String, String>> appVersions) throws Exception {
    List<Map<String, String>> request = appVersions.stream().map(e -> (e.getSecond() == null) ? Collections.singletonMap("appId", e.getFirst()) : ImmutableMap.of("appId", e.getFirst(), "version", e.getSecond())).collect(Collectors.toList());
    HttpResponse response = doPost(getVersionedAPIPath("appdetail", Constants.Gateway.API_VERSION_3_TOKEN, namespace), GSON.toJson(request));
    assertResponseCode(200, response);
    Assert.assertEquals("application/json", getFirstHeaderValue(response, HttpHeaderNames.CONTENT_TYPE.toString()));
    return readResponse(response, new TypeToken<List<BatchApplicationDetail>>() {
    }.getType());
}
Also used : BatchProgramSchedule(io.cdap.cdap.proto.BatchProgramSchedule) Manifest(java.util.jar.Manifest) Arrays(java.util.Arrays) TypeToken(com.google.gson.reflect.TypeToken) ImmutablePair(io.cdap.cdap.common.utils.ImmutablePair) UGIProvider(io.cdap.cdap.security.impersonation.UGIProvider) GsonBuilder(com.google.gson.GsonBuilder) ScheduledRuntime(io.cdap.cdap.proto.ScheduledRuntime) DefaultMetadataServiceClient(io.cdap.cdap.data2.metadata.writer.DefaultMetadataServiceClient) InetAddress(java.net.InetAddress) ProgramScheduleStatus(io.cdap.cdap.internal.app.runtime.schedule.ProgramScheduleStatus) MediaType(javax.ws.rs.core.MediaType) Map(java.util.Map) Closeables(com.google.common.io.Closeables) ClassRule(org.junit.ClassRule) ScheduleDetail(io.cdap.cdap.proto.ScheduleDetail) AfterClass(org.junit.AfterClass) MetadataSubscriberService(io.cdap.cdap.metadata.MetadataSubscriberService) StoreDefinition(io.cdap.cdap.store.StoreDefinition) AppFabricTestModule(io.cdap.cdap.internal.guice.AppFabricTestModule) Set(java.util.Set) Constraint(io.cdap.cdap.internal.schedule.constraint.Constraint) ProgramRunStatus(io.cdap.cdap.proto.ProgramRunStatus) Id(io.cdap.cdap.common.id.Id) ApplicationSpecificationAdapter(io.cdap.cdap.internal.app.ApplicationSpecificationAdapter) AppFabricServer(io.cdap.cdap.internal.app.services.AppFabricServer) MetadataScope(io.cdap.cdap.api.metadata.MetadataScope) TriggerCodec(io.cdap.cdap.internal.app.runtime.schedule.trigger.TriggerCodec) ApplicationId(io.cdap.cdap.proto.id.ApplicationId) Joiner(com.google.common.base.Joiner) RunRecord(io.cdap.cdap.proto.RunRecord) Location(org.apache.twill.filesystem.Location) SatisfiableTrigger(io.cdap.cdap.internal.app.runtime.schedule.trigger.SatisfiableTrigger) UnauthorizedException(io.cdap.cdap.security.spi.authorization.UnauthorizedException) Strings(com.google.common.base.Strings) ProfileStatus(io.cdap.cdap.runtime.spi.profile.ProfileStatus) Discoverable(org.apache.twill.discovery.Discoverable) DiscoveryServiceClient(org.apache.twill.discovery.DiscoveryServiceClient) Locations(io.cdap.cdap.common.io.Locations) DatasetOpExecutorService(io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutorService) MetricDataQuery(io.cdap.cdap.api.metrics.MetricDataQuery) CurrentUGIProvider(io.cdap.cdap.security.impersonation.CurrentUGIProvider) Nullable(javax.annotation.Nullable) PreferencesDetail(io.cdap.cdap.proto.PreferencesDetail) TransactionManager(org.apache.tephra.TransactionManager) DatasetMeta(io.cdap.cdap.proto.DatasetMeta) URIScheme(io.cdap.cdap.common.discovery.URIScheme) IOException(java.io.IOException) LocationFactory(org.apache.twill.filesystem.LocationFactory) File(java.io.File) Service(com.google.common.util.concurrent.Service) MetadataClient(io.cdap.cdap.client.MetadataClient) Schedulers(io.cdap.cdap.internal.app.runtime.schedule.store.Schedulers) Guice(com.google.inject.Guice) Preconditions(com.google.common.base.Preconditions) TimeValue(io.cdap.cdap.api.dataset.lib.cube.TimeValue) HttpHeaderNames(io.netty.handler.codec.http.HttpHeaderNames) Assert(org.junit.Assert) InputSupplier(com.google.common.io.InputSupplier) MetadataService(io.cdap.cdap.metadata.MetadataService) AbstractModule(com.google.inject.AbstractModule) HttpRequest(io.cdap.common.http.HttpRequest) JsonObject(com.google.gson.JsonObject) Module(com.google.inject.Module) RandomEndpointStrategy(io.cdap.cdap.common.discovery.RandomEndpointStrategy) NamespaceId(io.cdap.cdap.proto.id.NamespaceId) HttpResponse(io.cdap.common.http.HttpResponse) EndpointStrategy(io.cdap.cdap.common.discovery.EndpointStrategy) AppJarHelper(io.cdap.cdap.common.test.AppJarHelper) ProtoConstraintCodec(io.cdap.cdap.proto.ProtoConstraintCodec) DatasetId(io.cdap.cdap.proto.id.DatasetId) Gson(com.google.gson.Gson) ProgramStatus(io.cdap.cdap.api.ProgramStatus) ServiceStore(io.cdap.cdap.app.store.ServiceStore) MetadataEntity(io.cdap.cdap.api.metadata.MetadataEntity) MetadataMutation(io.cdap.cdap.spi.metadata.MetadataMutation) URI(java.net.URI) AuthenticationTestContext(io.cdap.cdap.security.auth.context.AuthenticationTestContext) Tasks(io.cdap.cdap.common.utils.Tasks) BatchApplicationDetail(io.cdap.cdap.proto.BatchApplicationDetail) ImmutableMap(com.google.common.collect.ImmutableMap) Collection(java.util.Collection) MessagingService(io.cdap.cdap.messaging.MessagingService) HttpResponseStatus(io.netty.handler.codec.http.HttpResponseStatus) Collectors(java.util.stream.Collectors) HttpRequestConfig(io.cdap.common.http.HttpRequestConfig) NamespaceMeta(io.cdap.cdap.proto.NamespaceMeta) List(java.util.List) AggregationFunction(io.cdap.cdap.api.dataset.lib.cube.AggregationFunction) SecurityRequestContext(io.cdap.cdap.security.spi.authentication.SecurityRequestContext) Type(java.lang.reflect.Type) ClientConfig(io.cdap.cdap.client.config.ClientConfig) CaseInsensitiveEnumTypeAdapterFactory(io.cdap.cdap.common.io.CaseInsensitiveEnumTypeAdapterFactory) DatasetService(io.cdap.cdap.data2.datafabric.dataset.service.DatasetService) Optional(java.util.Optional) Constants(io.cdap.cdap.common.conf.Constants) ProfileId(io.cdap.cdap.proto.id.ProfileId) StructuredTableAdmin(io.cdap.cdap.spi.data.StructuredTableAdmin) NotFoundException(io.cdap.cdap.common.NotFoundException) RemoteClientFactory(io.cdap.cdap.common.internal.remote.RemoteClientFactory) Retries(io.cdap.cdap.common.service.Retries) PluginJarHelper(io.cdap.cdap.common.test.PluginJarHelper) BeforeClass(org.junit.BeforeClass) BatchProgramHistory(io.cdap.cdap.proto.BatchProgramHistory) ArtifactRange(io.cdap.cdap.api.artifact.ArtifactRange) ManifestFields(io.cdap.cdap.app.program.ManifestFields) Modules(com.google.inject.util.Modules) MetricStore(io.cdap.cdap.api.metrics.MetricStore) HashMap(java.util.HashMap) EntityId(io.cdap.cdap.proto.id.EntityId) MetadataStorage(io.cdap.cdap.spi.metadata.MetadataStorage) DatasetClient(io.cdap.cdap.client.DatasetClient) Trigger(io.cdap.cdap.api.schedule.Trigger) LogQueryService(io.cdap.cdap.logging.service.LogQueryService) BatchProgram(io.cdap.cdap.proto.BatchProgram) ConnectionConfig(io.cdap.cdap.client.config.ConnectionConfig) Profile(io.cdap.cdap.proto.profile.Profile) HttpRequests(io.cdap.common.http.HttpRequests) AbstractAppFabricHttpHandler(io.cdap.cdap.gateway.handlers.util.AbstractAppFabricHttpHandler) ProtoTrigger(io.cdap.cdap.proto.ProtoTrigger) TransactionSystemClient(org.apache.tephra.TransactionSystemClient) Scheduler(io.cdap.cdap.scheduler.Scheduler) ProgramId(io.cdap.cdap.proto.id.ProgramId) TxConstants(org.apache.tephra.TxConstants) Config(io.cdap.cdap.api.Config) MetricTimeSeries(io.cdap.cdap.api.metrics.MetricTimeSeries) Scopes(com.google.inject.Scopes) CoreSchedulerService(io.cdap.cdap.scheduler.CoreSchedulerService) UnauthenticatedException(io.cdap.cdap.security.spi.authentication.UnauthenticatedException) MetricsCollectionService(io.cdap.cdap.api.metrics.MetricsCollectionService) Injector(com.google.inject.Injector) DefaultInternalAuthenticator(io.cdap.cdap.common.internal.remote.DefaultInternalAuthenticator) TimeUnit(java.util.concurrent.TimeUnit) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) EntityScope(io.cdap.cdap.proto.EntityScope) AppRequest(io.cdap.cdap.proto.artifact.AppRequest) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) InputStream(java.io.InputStream) TypeToken(com.google.gson.reflect.TypeToken) HttpResponse(io.cdap.common.http.HttpResponse) BatchApplicationDetail(io.cdap.cdap.proto.BatchApplicationDetail) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) HashMap(java.util.HashMap)

Aggregations

ImmutablePair (io.cdap.cdap.common.utils.ImmutablePair)15 ArrayList (java.util.ArrayList)5 HashSet (java.util.HashSet)4 Map (java.util.Map)4 VisibleForTesting (com.google.common.annotations.VisibleForTesting)3 ImmutableMap (com.google.common.collect.ImmutableMap)3 Injector (com.google.inject.Injector)3 MetadataEntity (io.cdap.cdap.api.metadata.MetadataEntity)3 CConfiguration (io.cdap.cdap.common.conf.CConfiguration)3 Constants (io.cdap.cdap.common.conf.Constants)3 FuzzyRowFilter (io.cdap.cdap.data2.dataset2.lib.table.FuzzyRowFilter)3 DatasetId (io.cdap.cdap.proto.id.DatasetId)3 NamespaceId (io.cdap.cdap.proto.id.NamespaceId)3 IOException (java.io.IOException)3 Collection (java.util.Collection)3 Collections (java.util.Collections)3 HashMap (java.util.HashMap)3 List (java.util.List)3 Set (java.util.Set)3 Collectors (java.util.stream.Collectors)3