use of com.bakdata.conquery.models.datasets.Table in project conquery by bakdata.
the class BucketManager method create.
public static BucketManager create(Worker worker, WorkerStorage storage, int entityBucketSize) {
Int2ObjectMap<Entity> entities = new Int2ObjectAVLTreeMap<>();
Map<Connector, Int2ObjectMap<Map<Bucket, CBlock>>> connectorCBlocks = new HashMap<>();
Map<Table, Int2ObjectMap<List<Bucket>>> tableBuckets = new HashMap<>();
IntArraySet assignedBucketNumbers = worker.getInfo().getIncludedBuckets();
log.trace("Trying to load these buckets that map to: {}", assignedBucketNumbers);
for (Bucket bucket : storage.getAllBuckets()) {
if (!assignedBucketNumbers.contains(bucket.getBucket())) {
log.warn("Found Bucket[{}] in Storage that does not belong to this Worker according to the Worker information.", bucket.getId());
}
registerBucket(bucket, entities, tableBuckets);
}
for (CBlock cBlock : storage.getAllCBlocks()) {
registerCBlock(cBlock, connectorCBlocks);
}
return new BucketManager(worker.getJobManager(), storage, worker, entities, connectorCBlocks, tableBuckets, entityBucketSize);
}
use of com.bakdata.conquery.models.datasets.Table in project conquery by bakdata.
the class RequiredTable method toTable.
public Table toTable(Dataset dataset, CentralRegistry centralRegistry) {
Table table = new Table();
table.setDataset(dataset);
table.setName(name);
table.setColumns(Arrays.stream(columns).map(col -> col.toColumn(table, centralRegistry)).toArray(Column[]::new));
return table;
}
Aggregations