You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/04/04 14:58:48 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #5452: [Audit][Stream Load] Support audit function for stream load

morningman commented on a change in pull request #5452:
URL: https://github.com/apache/incubator-doris/pull/5452#discussion_r606805795



##########
File path: be/src/common/config.h
##########
@@ -348,6 +348,14 @@ CONF_mInt32(streaming_load_rpc_max_alive_time_sec, "1200");
 CONF_Int32(tablet_writer_open_rpc_timeout_sec, "60");
 // You can ignore brpc error '[E1011]The server is overcrowded' when writing data.
 CONF_mBool(tablet_writer_ignore_eovercrowded, "false");
+// batch size of stream load record reported to FE
+CONF_mInt32(stream_load_record_batch_size, "50");
+// expire time of stream load record in rocksdb.
+CONF_Int32(stream_load_record_expire_time_secs, "28800");
+// time interval to clean expired stream load records
+CONF_mInt64(clean_stream_load_record_interval_secs, "1800");
+// the storage path of stream load record rocksdb
+CONF_String(stream_load_record_path, "");

Review comment:
       If default `stream_load_record_path` is `""`, then the default rocksdb dir is
   `/stream_load`, so there will be error when BE starts:
   `rocks db open failed, reason:IO error: While mkdir if missing: /stream_load: Permission denied`
   Maybe `${DORIS_HOME}/` ?

##########
File path: be/src/runtime/stream_load/stream_load_record.h
##########
@@ -0,0 +1,57 @@
+// 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.
+
+#include <map>
+#include <string>
+
+#include "rocksdb/utilities/db_ttl.h"
+
+#pragma once
+
+namespace doris {
+
+class Status;
+
+class StreamLoadRecord {

Review comment:
       Better name as `StreamLoadRecorder`

##########
File path: gensrc/thrift/BackendService.thrift
##########
@@ -134,4 +159,6 @@ service BackendService {
     // release the context resource associated with the context_id
     DorisExternalService.TScanCloseResult close_scanner(1: DorisExternalService.TScanCloseParams params);
 
+    TStreamLoadRecordResult get_stream_load_record(1: string params);

Review comment:
       Rename `params` to a meaningful name, maybe `last_record_time`?
   But I think we'd better use a timestamp (which is in Long Integer type) to pass this param to decouple the implementation between RPC interface and the implementation in BE.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org