Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clean codes #12628

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading