You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "HonestManXin (via GitHub)" <gi...@apache.org> on 2023/07/17 08:40:57 UTC

[GitHub] [doris] HonestManXin opened a new pull request, #21881: [fix] hive table properties do not take effect when create spark session

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

   
   ## Proposed changes
   
   <!--Describe your changes.-->
   
   When creating a Hive external table for Spark loading, the Hive external table includes related information such as the Hive Metastore. However, when submitting a job, it is required to have the hive-site.xml file in the Spark conf directory; otherwise, the Spark job may fail with an error message indicating that the corresponding Hive table cannot be found.
   
   The SparkEtlJob.initSparkConfigs method sets the properties of the external table into the Spark conf. However, at this point, the Spark session has already been created, and the Hive-related parameters will not take effect. To ensure that the Spark Hive catalog properly loads Hive tables, you need to set the Hive-related parameters before creating the Spark session.


-- 
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] adonis0147 commented on pull request #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

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

   run buildall


-- 
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] adonis0147 commented on pull request #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

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

   run buildall


-- 
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 pull request #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

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

   PR approved by at least one committer and no changes requested.


-- 
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] adonis0147 merged pull request #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

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


-- 
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] xy720 commented on a diff in pull request #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

Posted by "xy720 (via GitHub)" <gi...@apache.org>.
xy720 commented on code in PR #21881:
URL: https://github.com/apache/doris/pull/21881#discussion_r1269011487


##########
fe/spark-dpp/src/main/java/org/apache/doris/load/loadv2/etl/SparkEtlJob.java:
##########
@@ -86,14 +94,19 @@ private void initSparkConfigs(Map<String, String> configs) {
             return;
         }
         for (Map.Entry<String, String> entry : configs.entrySet()) {
-            spark.sparkContext().conf().set(entry.getKey(), entry.getValue());
+            conf.set(entry.getKey(), entry.getValue());
+            conf.set("spark.hadoop." + entry.getKey(), entry.getValue());

Review Comment:
   All configurations need to be prefixed with this?



-- 
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 #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

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

   (From new machine)TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 51.43 seconds
    stream load tsv:          509 seconds loaded 74807831229 Bytes, about 140 MB/s
    stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
    stream load orc:          64 seconds loaded 1101869774 Bytes, about 16 MB/s
    stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
    insert into select:          29.1 seconds inserted 10000000 Rows, about 343K ops/s
    storage size: 17169101010 Bytes


-- 
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 pull request #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

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

   PR approved by anyone and no changes requested.


-- 
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] HonestManXin commented on a diff in pull request #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

Posted by "HonestManXin (via GitHub)" <gi...@apache.org>.
HonestManXin commented on code in PR #21881:
URL: https://github.com/apache/doris/pull/21881#discussion_r1269024072


##########
fe/spark-dpp/src/main/java/org/apache/doris/load/loadv2/etl/SparkEtlJob.java:
##########
@@ -86,14 +94,19 @@ private void initSparkConfigs(Map<String, String> configs) {
             return;
         }
         for (Map.Entry<String, String> entry : configs.entrySet()) {
-            spark.sparkContext().conf().set(entry.getKey(), entry.getValue());
+            conf.set(entry.getKey(), entry.getValue());
+            conf.set("spark.hadoop." + entry.getKey(), entry.getValue());

Review Comment:
   yes, hive related config need to be prefixed with this, and spark will trim the prefix and set it into hadoop configuration, then hive metastore client  initialized with hadoop configuration.
   ![image](https://github.com/apache/doris/assets/1614501/e34bd5c5-82ae-4542-9dde-0a81d0464fe3)
   



-- 
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 #21881: [fix](spark load) Hive table properties do not take effect when creating spark session

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

   (From new machine)TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 53.15 seconds
    stream load tsv:          535 seconds loaded 74807831229 Bytes, about 133 MB/s
    stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
    stream load orc:          65 seconds loaded 1101869774 Bytes, about 16 MB/s
    stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
    insert into select:          28.9 seconds inserted 10000000 Rows, about 346K ops/s
    storage size: 17162314625 Bytes


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