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/09/22 03:17:31 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #6644: Support hdfs in select outfile clause

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



##########
File path: be/src/runtime/file_result_writer.cpp
##########
@@ -131,12 +132,14 @@ Status FileResultWriter::_create_next_file_writer() {
 Status FileResultWriter::_create_file_writer(const std::string& file_name) {
     if (_storage_type == TStorageBackendType::LOCAL) {
         _file_writer = new LocalFileWriter(file_name, 0 /* start offset */);
-    } else if (_storage_type == TStorageBackendType::BROKER){
+    } else if (_storage_type == TStorageBackendType::BROKER) {
         _file_writer =
                 new BrokerWriter(_state->exec_env(), _file_opts->broker_addresses,
                                  _file_opts->broker_properties, file_name, 0 /*start offset*/);
     } else if (_storage_type == TStorageBackendType::S3) {
         _file_writer =  new S3Writer(_file_opts->broker_properties, file_name, 0 /* offset */);
+    } else if (_storage_type == TStorageBackendType::HDFS) {
+        _file_writer = new HDFSWriter(const_cast<std::map<std::string, std::string>&>(_file_opts->broker_properties), file_name);

Review comment:
       Why need a `const_cast` here but `S3Writer` don't?

##########
File path: be/src/runtime/result_file_sink.cpp
##########
@@ -119,6 +116,9 @@ Status ResultFileSink::prepare(RuntimeState* state) {
 
     }
     RETURN_IF_ERROR(_writer->init(state));
+    for (int i = 0; i < _channels.size(); ++i) {

Review comment:
       So this is a bug?




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