use of io.hetu.core.cube.startree.tree.StarTreeMetadata in project hetu-core by openlookeng.
the class TestStarTreeMetaStore method setup.
@BeforeClass
public void setup() {
FeaturesConfig featuresConfig = new FeaturesConfig();
featuresConfig.setCubeMetadataCacheTtl(Duration.valueOf("5m"));
featuresConfig.setCubeMetadataCacheSize(1000);
Properties properties = new Properties();
properties.setProperty("cache-ttl", Long.toString(featuresConfig.getCubeMetadataCacheTtl().toMillis()));
properties.setProperty("cache-size", Long.toString(featuresConfig.getCubeMetadataCacheSize()));
metaStore = new MockMetaStore();
cubeMetadataService = new StarTreeProvider().getCubeMetaStore(metaStore, properties);
cubeMetadata1 = new StarTreeMetadata("star1", "a", 1000, ImmutableList.of(new AggregateColumn("sum_cost", "SUM", "cost", false), new DimensionColumn("value", "value")), ImmutableList.of(ImmutableSet.of("value")), null, 10000, CubeStatus.READY);
cubeMetadata2 = new StarTreeMetadata("star2", "a", 1000, ImmutableList.of(new AggregateColumn("sum_cost", "SUM", "cost", false), new DimensionColumn("value", "value")), ImmutableList.of(ImmutableSet.of("value")), null, 10000, CubeStatus.READY);
}
use of io.hetu.core.cube.startree.tree.StarTreeMetadata in project hetu-core by openlookeng.
the class TestStarTreeMetaStore method testUpdateMetadata.
@Test
public void testUpdateMetadata() {
cubeMetadataService.persist(cubeMetadata1);
StarTreeMetadata starTreeMetadata = (StarTreeMetadata) cubeMetadata1;
StarTreeMetadataBuilder builder = new StarTreeMetadataBuilder(starTreeMetadata);
builder.setCubeLastUpdatedTime(System.currentTimeMillis());
CubeMetadata updated = builder.build();
assertNotEquals(cubeMetadata1, updated);
}
Aggregations