You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "ByteYue (via GitHub)" <gi...@apache.org> on 2023/04/14 06:05:34 UTC

[GitHub] [doris] ByteYue opened a new pull request, #18667: [test](bufferedreader) add ut for buffered reader

ByteYue opened a new pull request, #18667:
URL: https://github.com/apache/doris/pull/18667

   # Proposed changes
   
   Issue Number: close #xxx
   Add one ut source file for buffered reader to check correctness of implementation.
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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: commits-unsubscribe@doris.apache.org

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


[GitHub] [doris] hello-stephen commented on pull request #18667: [test](bufferedreader) add ut for buffered reader

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #18667:
URL: https://github.com/apache/doris/pull/18667#issuecomment-1508030210

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 34.27 seconds
    stream load tsv:          424 seconds loaded 74807831229 Bytes, about 168 MB/s
    stream load json:         23 seconds loaded 2358488459 Bytes, about 97 MB/s
    stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
    stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230414070702_clickbench_pr_129019.html


-- 
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: commits-unsubscribe@doris.apache.org

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


[GitHub] [doris] dataroaring merged pull request #18667: [test](bufferedreader) add ut for buffered reader

Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring merged PR #18667:
URL: https://github.com/apache/doris/pull/18667


-- 
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: commits-unsubscribe@doris.apache.org

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


[GitHub] [doris] github-actions[bot] commented on a diff in pull request #18667: [test](bufferedreader) add ut for buffered reader

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #18667:
URL: https://github.com/apache/doris/pull/18667#discussion_r1166317874


##########
be/test/io/fs/buffered_reader_test.cpp:
##########
@@ -0,0 +1,225 @@
+// 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 "io/fs/buffered_reader.h"
+
+#include <gtest/gtest.h>
+
+#include <memory>
+
+#include "io/fs/file_reader_writer_fwd.h"
+#include "io/fs/local_file_reader.h"
+#include "io/fs/local_file_system.h"
+#include "runtime/exec_env.h"
+#include "util/stopwatch.hpp"
+
+namespace doris {
+using io::FileReader;
+class BufferedReaderTest : public testing::Test {
+public:
+    BufferedReaderTest() {
+        std::unique_ptr<ThreadPool> _pool;
+        ThreadPoolBuilder("BufferedReaderPrefetchThreadPool")
+                .set_min_threads(5)
+                .set_max_threads(10)
+                .build(&_pool);
+        ExecEnv::GetInstance()->_buffered_reader_prefetch_thread_pool = std::move(_pool);

Review Comment:
   warning: '_buffered_reader_prefetch_thread_pool' is a private member of 'doris::ExecEnv' [clang-diagnostic-error]
   ```cpp
           ExecEnv::GetInstance()->_buffered_reader_prefetch_thread_pool = std::move(_pool);
                                   ^
   ```
   **be/src/runtime/exec_env.h:225:** declared private here
   ```cpp
       std::unique_ptr<ThreadPool> _buffered_reader_prefetch_thread_pool;
                                   ^
   ```
   



##########
be/test/io/fs/buffered_reader_test.cpp:
##########
@@ -0,0 +1,225 @@
+// 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 "io/fs/buffered_reader.h"
+
+#include <gtest/gtest.h>
+
+#include <memory>
+
+#include "io/fs/file_reader_writer_fwd.h"
+#include "io/fs/local_file_reader.h"
+#include "io/fs/local_file_system.h"
+#include "runtime/exec_env.h"
+#include "util/stopwatch.hpp"
+
+namespace doris {
+using io::FileReader;
+class BufferedReaderTest : public testing::Test {
+public:
+    BufferedReaderTest() {
+        std::unique_ptr<ThreadPool> _pool;
+        ThreadPoolBuilder("BufferedReaderPrefetchThreadPool")
+                .set_min_threads(5)
+                .set_max_threads(10)
+                .build(&_pool);
+        ExecEnv::GetInstance()->_buffered_reader_prefetch_thread_pool = std::move(_pool);
+    }
+
+protected:
+    virtual void SetUp() {}
+    virtual void TearDown() {}

Review Comment:
   warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override]
   
   ```suggestion
       void TearDown() override {}
   ```
   



##########
be/test/io/fs/buffered_reader_test.cpp:
##########
@@ -0,0 +1,225 @@
+// 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 "io/fs/buffered_reader.h"
+
+#include <gtest/gtest.h>
+
+#include <memory>
+
+#include "io/fs/file_reader_writer_fwd.h"
+#include "io/fs/local_file_reader.h"
+#include "io/fs/local_file_system.h"
+#include "runtime/exec_env.h"
+#include "util/stopwatch.hpp"
+
+namespace doris {
+using io::FileReader;
+class BufferedReaderTest : public testing::Test {
+public:
+    BufferedReaderTest() {
+        std::unique_ptr<ThreadPool> _pool;
+        ThreadPoolBuilder("BufferedReaderPrefetchThreadPool")
+                .set_min_threads(5)
+                .set_max_threads(10)
+                .build(&_pool);
+        ExecEnv::GetInstance()->_buffered_reader_prefetch_thread_pool = std::move(_pool);
+    }
+
+protected:
+    virtual void SetUp() {}

Review Comment:
   warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override]
   
   ```suggestion
       void SetUp() override {}
   ```
   



-- 
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: commits-unsubscribe@doris.apache.org

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


[GitHub] [doris] ByteYue commented on pull request #18667: [test](bufferedreader) add ut for buffered reader

Posted by "ByteYue (via GitHub)" <gi...@apache.org>.
ByteYue commented on PR #18667:
URL: https://github.com/apache/doris/pull/18667#issuecomment-1507968439

   run buildadd


-- 
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: commits-unsubscribe@doris.apache.org

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