Skip to content

Commit

Permalink
Adding exception in the emptyDAO
Browse files Browse the repository at this point in the history
  • Loading branch information
mrproliu committed Oct 10, 2023
1 parent 2ce3654 commit a797e32
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import org.apache.skywalking.oap.server.telemetry.api.MetricsTag;
import zipkin.server.storage.cassandra.dao.CassandraBatchDAO;
import zipkin.server.storage.cassandra.dao.CassandraHistoryDeleteDAO;
import zipkin.server.storage.cassandra.dao.CassandraSpanAttachedEventRecordDAO;
import zipkin.server.storage.cassandra.dao.CassandraStorageDAO;
import zipkin.server.storage.cassandra.dao.CassandraTagAutocompleteDAO;
import zipkin.server.storage.cassandra.dao.CassandraZipkinQueryDAO;
Expand Down Expand Up @@ -134,8 +135,7 @@ public void prepare() throws ServiceNotProvidedException, ModuleStartException {
this.registerServiceImplementation(IEBPFProfilingDataDAO.class, emptyDAO);
this.registerServiceImplementation(IContinuousProfilingPolicyDAO.class, emptyDAO);
this.registerServiceImplementation(IServiceLabelDAO.class, emptyDAO);
this.registerServiceImplementation(ITagAutoCompleteQueryDAO.class, emptyDAO);
this.registerServiceImplementation(ISpanAttachedEventQueryDAO.class, emptyDAO);
this.registerServiceImplementation(ISpanAttachedEventQueryDAO.class, new CassandraSpanAttachedEventRecordDAO());

this.registerServiceImplementation(IHistoryDeleteDAO.class, new CassandraHistoryDeleteDAO(client, tableHelper, modelInstaller, Clock.systemDefaultZone()));
this.registerServiceImplementation(IZipkinQueryDAO.class, new CassandraZipkinQueryDAO(client, tableHelper));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2015-2023 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package zipkin.server.storage.cassandra.dao;

import org.apache.skywalking.oap.server.core.analysis.manual.spanattach.SpanAttachedEventRecord;
import org.apache.skywalking.oap.server.core.analysis.manual.spanattach.SpanAttachedEventTraceType;
import org.apache.skywalking.oap.server.core.storage.query.ISpanAttachedEventQueryDAO;

import java.io.IOException;
import java.util.Collections;
import java.util.List;

public class CassandraSpanAttachedEventRecordDAO implements ISpanAttachedEventQueryDAO {
@Override
public List<SpanAttachedEventRecord> querySpanAttachedEvents(SpanAttachedEventTraceType type, List<String> traceIds) throws IOException {
return Collections.emptyList();
}
}
Loading

0 comments on commit a797e32

Please sign in to comment.