.collect(Collectors.toSet()); return buildDimensionSpanningTableGroup( currentTableGroupTableNames, tableDefinitions,
/** * Load several logical tables into the logicalDictionary, each with their own scoped metric dictionary. * <p> * Note: This builds the logical tables as well. * * @param nameGroupMap A map of logical table name to table group information * @param validGrains The accepted grains for the logical table * @param tableDictionary The logical table dictionary to be populated * @param scopedMetrics A mapping from table name to the scoped MetricDictionary to use for that table */ public void loadLogicalTablesWithGranularities( Map<String, TableGroup> nameGroupMap, Set<? extends Granularity> validGrains, LogicalTableDictionary tableDictionary, Map<String, MetricDictionary> scopedMetrics ) { for (Map.Entry<String, TableGroup> entry : nameGroupMap.entrySet()) { String logicalTableName = entry.getKey(); TableGroup group = entry.getValue(); loadLogicalTableWithGranularities( logicalTableName, group, validGrains, tableDictionary, scopedMetrics.get(logicalTableName) ); } }
/** * Load several logical tables into the logicalDictionary, all with the globally-scoped metric dictionary. * <p> * Note: This builds the logical tables as well. * * @param nameGroupMap A map of logical table name to table group information * @param validGrains The accepted grains for the logical table * @param dictionaries The resource dictionaries for reading and storing configuration */ public void loadLogicalTablesWithGranularities( Map<String, TableGroup> nameGroupMap, Set<? extends Granularity> validGrains, ResourceDictionaries dictionaries ) { loadLogicalTablesWithGranularities( nameGroupMap, validGrains, dictionaries.getLogicalDictionary(), nameGroupMap.keySet().stream() .collect(Collectors.toMap(Function.identity(), i -> dictionaries.getMetricDictionary())) ); }
Set<ApiMetricName> apiMetrics ) { Map<String, PhysicalTableDefinition> availableTableDefinitions = buildPhysicalTableDefinitionDictionary( tableDefinitions ); .map(tableName -> buildPhysicalTableWithDependency( tableName, availableTableDefinitions,
physicalTableDictionary.put( tableName.asName(), buildPhysicalTableWithDependency( tableName.asName(), availableTableDefinitions, getDataSourceMetadataService() ); physicalTableDictionary.put(currentTableName, currentTableBuilt);
/** * Load a new physical table into the dictionary and return the loaded physical table. * * @param definition A config object for the physical table * @param metricNames The Set of metric names on the table * @param dictionaries The resource dictionaries for reading and storing resource data * * @return The physical table created * * @deprecated use buildPhysicalTableWithDependency instead, which also supports building table with dependencies */ @Deprecated protected PhysicalTable loadPhysicalTable( PhysicalTableDefinition definition, Set<FieldName> metricNames, ResourceDictionaries dictionaries ) { LOG.debug( "Building table {} with deprecated loadPhysicalTable method, use buildPhysicalTableWithDependency " + "instead", definition.getName().asName() ); return definition.build(dictionaries, getDataSourceMetadataService()); }
/** * Load a logical table into the logicalDictionary. * <p> * Note: This builds the logical table as well. * * @param logicalTableName The logical table name * @param nameGroup The table group information for the logical table * @param validGrains The accepted grains for the logical table * @param dictionaries The resource dictionaries for reading and storing configuration */ public void loadLogicalTableWithGranularities( String logicalTableName, TableGroup nameGroup, Set<? extends Granularity> validGrains, ResourceDictionaries dictionaries ) { loadLogicalTableWithGranularities( logicalTableName, nameGroup, validGrains, dictionaries.getLogicalDictionary(), dictionaries.getMetricDictionary() ); }