Search in sources :

Example 6 with PartitionListRequest

use of com.netflix.metacat.common.server.connectors.model.PartitionListRequest in project metacat by Netflix.

the class ConverterUtil method toPartitionListRequest.

/**
 * Creates the partition list connector request.
 *
 * @param partitionsRequestDto request containing the filter and other properties used for listing
 * @param pageable             pageable info
 * @param sort                 sort info
 * @return connector request
 */
public PartitionListRequest toPartitionListRequest(final GetPartitionsRequestDto partitionsRequestDto, final Pageable pageable, final Sort sort) {
    if (partitionsRequestDto != null) {
        if (partitionsRequestDto.getIncludePartitionDetails() == null) {
            partitionsRequestDto.setIncludePartitionDetails(false);
        }
        if (partitionsRequestDto.getIncludeAuditOnly() == null) {
            partitionsRequestDto.setIncludeAuditOnly(false);
        }
        final PartitionListRequest result = mapper.map(partitionsRequestDto, PartitionListRequest.class);
        result.setPageable(pageable);
        result.setSort(sort);
        return result;
    } else {
        return new PartitionListRequest(null, null, false, pageable, sort, false);
    }
}
Also used : PartitionListRequest(com.netflix.metacat.common.server.connectors.model.PartitionListRequest)

Aggregations

PartitionListRequest (com.netflix.metacat.common.server.connectors.model.PartitionListRequest)6 QualifiedName (com.netflix.metacat.common.QualifiedName)5 Pageable (com.netflix.metacat.common.dto.Pageable)5 Sort (com.netflix.metacat.common.dto.Sort)5 PartitionInfo (com.netflix.metacat.common.server.connectors.model.PartitionInfo)5 Registry (com.netflix.spectator.api.Registry)5 List (java.util.List)5 Map (java.util.Map)5 Strings (com.google.common.base.Strings)4 Throwables (com.google.common.base.Throwables)4 Lists (com.google.common.collect.Lists)4 Maps (com.google.common.collect.Maps)4 Futures (com.google.common.util.concurrent.Futures)4 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)4 ConnectorContext (com.netflix.metacat.common.server.connectors.ConnectorContext)4 ConnectorRequestContext (com.netflix.metacat.common.server.connectors.ConnectorRequestContext)4 AuditInfo (com.netflix.metacat.common.server.connectors.model.AuditInfo)4 StorageInfo (com.netflix.metacat.common.server.connectors.model.StorageInfo)4 ThreadServiceManager (com.netflix.metacat.common.server.util.ThreadServiceManager)4 HiveMetrics (com.netflix.metacat.connector.hive.monitoring.HiveMetrics)4