zhengziyi0117 commented on code in PR #12671: URL: https://github.com/apache/skywalking/pull/12671#discussion_r1823687052
########## oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/profiling/asyncprofiler/storage/JFRProfilingDataRecord.java: ########## @@ -0,0 +1,117 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 org.apache.skywalking.oap.server.core.profiling.asyncprofiler.storage; + +import com.google.common.hash.Hashing; +import lombok.Data; +import org.apache.skywalking.oap.server.core.analysis.Stream; +import org.apache.skywalking.oap.server.core.analysis.record.Record; +import org.apache.skywalking.oap.server.core.analysis.worker.RecordStreamProcessor; +import org.apache.skywalking.oap.server.core.storage.StorageID; +import org.apache.skywalking.oap.server.core.storage.annotation.BanyanDB; +import org.apache.skywalking.oap.server.core.storage.annotation.Column; +import org.apache.skywalking.oap.server.core.storage.type.Convert2Entity; +import org.apache.skywalking.oap.server.core.storage.type.Convert2Storage; +import org.apache.skywalking.oap.server.core.storage.type.StorageBuilder; +import org.apache.skywalking.oap.server.library.jfr.parser.convert.FrameTree; +import org.apache.skywalking.oap.server.library.jfr.parser.type.event.JFREventType; + +import java.nio.charset.StandardCharsets; + +import static org.apache.skywalking.oap.server.core.source.DefaultScopeDefine.JFR_PROFILING_DATA; + +@Data +@Stream(name = JFRProfilingDataRecord.INDEX_NAME, scopeId = JFR_PROFILING_DATA, + builder = JFRProfilingDataRecord.Builder.class, processor = RecordStreamProcessor.class) [email protected](JFRProfilingDataRecord.UPLOAD_TIME) +public class JFRProfilingDataRecord extends Record { + public static final String INDEX_NAME = "jfr_profiling_data"; + + public static final String TASK_ID = "task_id"; + public static final String EVENT_TYPE = "event_type"; + public static final String INSTANCE_ID = "instance_id"; + public static final String DATA_BINARY = "data_binary"; + public static final String UPLOAD_TIME = "upload_time"; + + @Column(name = TASK_ID) + private String taskId; + + @Column(name = INSTANCE_ID) + @BanyanDB.SeriesID(index = 0) + private String instanceId; Review Comment: JFR data will be queried through instance ID, task ID and event, while task logs are queried in batches and filtered in oap. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
