Skip to content

Commit

Permalink
chore: clean codes
Browse files Browse the repository at this point in the history
  • Loading branch information
wankai123 committed Sep 20, 2024
1 parent df05b3d commit ba1d16b
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ public StreamModel registerStreamModel(Model model, BanyanDBStorageConfig config
builder.setEntity(BanyandbDatabase.Entity.newBuilder().addAllTagNames(shardingColumns));
builder.addAllTagFamilies(tagFamilySpecs);

//builder.addIndexes(indexRules);
registry.put(schemaMetadata.name(), schemaBuilder.build());
return new StreamModel(builder.build(), indexRules);
}
Expand Down Expand Up @@ -169,7 +168,6 @@ public MeasureModel registerMeasureModel(Model model, BanyanDBStorageConfig conf

if (model.getBanyanDBModelExtension().isStoreIDTag()) {
indexRules.add(indexRule(schemaMetadata.group, BanyanDBConverter.ID));
// indexRules.add(IndexRule.create(BanyanDBConverter.ID, IndexRule.IndexType.INVERTED));
}

final Measure.Builder builder = Measure.newBuilder();
Expand All @@ -178,9 +176,6 @@ public MeasureModel registerMeasureModel(Model model, BanyanDBStorageConfig conf
builder.setInterval(downSamplingDuration(model.getDownsampling()).format());
builder.setEntity(BanyandbDatabase.Entity.newBuilder().addAllTagNames(shardingColumns));
builder.addAllTagFamilies(tagFamilySpecs);
// if (!indexRules.isEmpty()) {
// builder.addIndexes(indexRules);
// }
// parse and set field
for (BanyandbDatabase.FieldSpec field : tagsAndFields.fields) {
builder.addFields(field);
Expand Down Expand Up @@ -308,7 +303,6 @@ IndexRule indexRule(String group, String tagName) {
return IndexRule.newBuilder()
.setMetadata(Metadata.newBuilder().setName(tagName).setGroup(group))
.setType(IndexRule.Type.TYPE_INVERTED).addTags(tagName).build();
//return IndexRule.create(tagName, IndexRule.IndexType.INVERTED);
}

/**
Expand Down Expand Up @@ -622,12 +616,6 @@ public boolean checkResourceExistence(BanyanDBClient client) throws BanyanDBExce
try {
if (!resourceExist.hasGroup()) {
Group g = client.define(gBuilder.setCatalog(Catalog.CATALOG_MEASURE).build());
// Group.create(this.group, Catalog.MEASURE, this.shard,
// IntervalRule.create(
// IntervalRule.Unit.DAY, this.segmentIntervalDays),
// IntervalRule.create(
// IntervalRule.Unit.DAY, this.ttlDays)
// ));
if (g != null) {
log.info("group {} created", g.getMetadata().getName());
}
Expand Down Expand Up @@ -742,14 +730,6 @@ public void installTopNAggregation(BanyanDBClient client) throws BanyanDBExcepti
.setCountersNumber(this.getTopNSpec().getCountersNumber())
.setLruSize(this.getTopNSpec().getLruSize());
client.define(builder.build());
// client.define(TopNAggregation.create(getMetadata().getGroup(), this.getTopNSpec().getName())
// .setSourceMeasureName(getMetadata().name())
// .setFieldValueSort(this.getTopNSpec().getSort())
// .setFieldName(this.getTopNSpec().getFieldName())
// .setGroupByTagNames(this.getTopNSpec().getGroupByTagNames())
// .setCountersNumber(this.getTopNSpec().getCountersNumber())
// .setLruSize(this.getTopNSpec().getLruSize())
// .build());
log.info("installed TopN schema for measure {}", getMetadata().name());
}
}
Expand Down

0 comments on commit ba1d16b

Please sign in to comment.