Search in sources :

Example 1 with InputFile

use of org.apache.accumulo.core.tabletserver.thrift.InputFile in project accumulo by apache.

the class ExternalCompactionJob method toThrift.

public TExternalCompactionJob toThrift() {
    IteratorConfig iteratorSettings = SystemIteratorUtil.toIteratorConfig(iters);
    List<InputFile> files = jobFiles.entrySet().stream().map(e -> {
        var dfv = e.getValue();
        return new InputFile(e.getKey().getPathStr(), dfv.getSize(), dfv.getNumEntries(), dfv.getTime());
    }).collect(Collectors.toList());
    return new TExternalCompactionJob(externalCompactionId.toString(), extent.toThrift(), files, iteratorSettings, compactTmpName.getPathStr(), propagateDeletes, org.apache.accumulo.core.tabletserver.thrift.TCompactionKind.valueOf(kind.name()), userCompactionId, overrides);
}
Also used : DataFileValue(org.apache.accumulo.core.metadata.schema.DataFileValue) IteratorConfig(org.apache.accumulo.core.tabletserver.thrift.IteratorConfig) KeyExtent(org.apache.accumulo.core.dataImpl.KeyExtent) Collectors(java.util.stream.Collectors) TExternalCompactionJob(org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob) Objects(java.util.Objects) IteratorSetting(org.apache.accumulo.core.client.IteratorSetting) List(java.util.List) SystemIteratorUtil(org.apache.accumulo.core.iteratorsImpl.system.SystemIteratorUtil) StoredTabletFile(org.apache.accumulo.core.metadata.StoredTabletFile) ExternalCompactionId(org.apache.accumulo.core.metadata.schema.ExternalCompactionId) CompactionKind(org.apache.accumulo.core.spi.compaction.CompactionKind) InputFile(org.apache.accumulo.core.tabletserver.thrift.InputFile) Map(java.util.Map) TabletFile(org.apache.accumulo.core.metadata.TabletFile) Preconditions(com.google.common.base.Preconditions) TExternalCompactionJob(org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob) IteratorConfig(org.apache.accumulo.core.tabletserver.thrift.IteratorConfig) InputFile(org.apache.accumulo.core.tabletserver.thrift.InputFile)

Aggregations

Preconditions (com.google.common.base.Preconditions)1 List (java.util.List)1 Map (java.util.Map)1 Objects (java.util.Objects)1 Collectors (java.util.stream.Collectors)1 IteratorSetting (org.apache.accumulo.core.client.IteratorSetting)1 KeyExtent (org.apache.accumulo.core.dataImpl.KeyExtent)1 SystemIteratorUtil (org.apache.accumulo.core.iteratorsImpl.system.SystemIteratorUtil)1 StoredTabletFile (org.apache.accumulo.core.metadata.StoredTabletFile)1 TabletFile (org.apache.accumulo.core.metadata.TabletFile)1 DataFileValue (org.apache.accumulo.core.metadata.schema.DataFileValue)1 ExternalCompactionId (org.apache.accumulo.core.metadata.schema.ExternalCompactionId)1 CompactionKind (org.apache.accumulo.core.spi.compaction.CompactionKind)1 InputFile (org.apache.accumulo.core.tabletserver.thrift.InputFile)1 IteratorConfig (org.apache.accumulo.core.tabletserver.thrift.IteratorConfig)1 TExternalCompactionJob (org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob)1