[jira] [Updated] (SPARK-38230) InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions in most cases

2023-09-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-38230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-38230:
---
Labels: pull-request-available  (was: )

> InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions 
> in most cases
> ---
>
> Key: SPARK-38230
> URL: https://issues.apache.org/jira/browse/SPARK-38230
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.2, 3.3.0, 3.4.0, 3.5.0
>Reporter: Coal Chan
>Priority: Major
>  Labels: pull-request-available
>
> In 
> `org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand`,
>  `sparkSession.sessionState.catalog.listPartitions` will call method 
> `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
> client, this method will produce multiple queries per partition on hive 
> metastore db. So when you insert into a table which has too many 
> partitions(ie: 10k), it will produce too many queries on hive metastore 
> db(ie: n * 10k = 10nk), it puts a lot of strain on the database.
> In fact, it calls method `listPartitions` in order to get locations of 
> partitions and get `customPartitionLocations`. But in most cases, we do not 
> have custom partitions, we can just get partition names, so we can call 
> method listPartitionNames.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-38230) InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions in most cases

2023-01-27 Thread Gabor Roczei (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-38230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gabor Roczei updated SPARK-38230:
-
Affects Version/s: 3.3.0
   3.4.0
   3.5.0

> InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions 
> in most cases
> ---
>
> Key: SPARK-38230
> URL: https://issues.apache.org/jira/browse/SPARK-38230
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.2, 3.3.0, 3.4.0, 3.5.0
>Reporter: Coal Chan
>Priority: Major
>
> In 
> `org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand`,
>  `sparkSession.sessionState.catalog.listPartitions` will call method 
> `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
> client, this method will produce multiple queries per partition on hive 
> metastore db. So when you insert into a table which has too many 
> partitions(ie: 10k), it will produce too many queries on hive metastore 
> db(ie: n * 10k = 10nk), it puts a lot of strain on the database.
> In fact, it calls method `listPartitions` in order to get locations of 
> partitions and get `customPartitionLocations`. But in most cases, we do not 
> have custom partitions, we can just get partition names, so we can call 
> method listPartitionNames.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-38230) InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions in most cases

2022-02-16 Thread Coal Chan (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-38230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Coal Chan updated SPARK-38230:
--
Description: 
In 
`org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand`, 
`sparkSession.sessionState.catalog.listPartitions` will call method 
`org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
client, this method will produce multiple queries per partition on hive 
metastore db. So when you insert into a table which has too many partitions(ie: 
10k), it will produce too many queries on hive metastore db(ie: n * 10k = 
10nk), it puts a lot of strain on the database.

In fact, it calls method `listPartitions` in order to get locations of 
partitions and get `customPartitionLocations`. But in most cases, we do not 
have custom partitions, we can just get partition names, so we can call method 
listPartitionNames.

  was:
In 
`org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand`, 
`sparkSession.sessionState.catalog.listPartitions` will call method 
`org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
client, this method will produce multiple queries per partition on hive 
metastore db. When you insert into a table which has too many partitions(ie: 
10k), it will produce too many queries on hive metastore db(ie: n * 10k = 
10nk), it puts a lot of strain on the database.

In fact, it calls method `listPartitions` in order to get locations of 
partitions and get `customPartitionLocations`. But in most cases, we do not 
have custom partitions, we can just get partition names, so we can call method 
listPartitionNames.


> InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions 
> in most cases
> ---
>
> Key: SPARK-38230
> URL: https://issues.apache.org/jira/browse/SPARK-38230
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.2
>Reporter: Coal Chan
>Priority: Major
>
> In 
> `org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand`,
>  `sparkSession.sessionState.catalog.listPartitions` will call method 
> `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
> client, this method will produce multiple queries per partition on hive 
> metastore db. So when you insert into a table which has too many 
> partitions(ie: 10k), it will produce too many queries on hive metastore 
> db(ie: n * 10k = 10nk), it puts a lot of strain on the database.
> In fact, it calls method `listPartitions` in order to get locations of 
> partitions and get `customPartitionLocations`. But in most cases, we do not 
> have custom partitions, we can just get partition names, so we can call 
> method listPartitionNames.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-38230) InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions in most cases

2022-02-16 Thread Coal Chan (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-38230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Coal Chan updated SPARK-38230:
--
Description: 
In 
`org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand`, 
`sparkSession.sessionState.catalog.listPartitions` will call method 
`org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
client, this method will produce multiple queries per partition on hive 
metastore db. When you insert into a table which has too many partitions(ie: 
10k), it will produce too many queries on hive metastore db(ie: n * 10k = 
10nk), it puts a lot of strain on the database.

In fact, it calls method `listPartitions` in order to get locations of 
partitions and get `customPartitionLocations`. But in most cases, we do not 
have custom partitions, we can just get partition names, so we can call method 
listPartitionNames.

  was:
In `org.apache.spark.sql.execution.datasources.

InsertIntoHadoopFsRelationCommand`, `

sparkSession.sessionState.catalog.listPartitions

` will call method `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` 
of hive metastore client, this method will produce multiple queries per 
partition on hive metastore db. When you insert into a table which has too many 
partitions(ie: 10k), it will produce too many queries on hive metastore db(ie: 
n * 10k = 10nk), it puts a lot of strain on the database.

In fact, it calls method `listPartitions` in order to get locations of 
partitions and get `customPartitionLocations`. But in most cases, we do not 
have custom partitions, we can just get partition names, so we can call method 
listPartitionNames.


> InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions 
> in most cases
> ---
>
> Key: SPARK-38230
> URL: https://issues.apache.org/jira/browse/SPARK-38230
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.2
>Reporter: Coal Chan
>Priority: Major
>
> In 
> `org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand`,
>  `sparkSession.sessionState.catalog.listPartitions` will call method 
> `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
> client, this method will produce multiple queries per partition on hive 
> metastore db. When you insert into a table which has too many partitions(ie: 
> 10k), it will produce too many queries on hive metastore db(ie: n * 10k = 
> 10nk), it puts a lot of strain on the database.
> In fact, it calls method `listPartitions` in order to get locations of 
> partitions and get `customPartitionLocations`. But in most cases, we do not 
> have custom partitions, we can just get partition names, so we can call 
> method listPartitionNames.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-38230) InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions in most cases

2022-02-16 Thread Coal Chan (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-38230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Coal Chan updated SPARK-38230:
--
Description: 
In `org.apache.spark.sql.execution.datasources.

InsertIntoHadoopFsRelationCommand`, `

sparkSession.sessionState.catalog.listPartitions

` will call method `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` 
of hive metastore client, this method will produce multiple queries per 
partition on hive metastore db. When you insert into a table which has too many 
partitions(ie: 10k), it will produce too many queries on hive metastore db(ie: 
n * 10k = 10nk), it puts a lot of strain on the database.

In fact, it calls method `listPartitions` in order to get locations of 
partitions and get `customPartitionLocations`. But in most cases, we do not 
have custom partitions, we can just get partition names, so we can call method 
listPartitionNames.

  was:
In `org.apache.spark.sql.execution.datasources.

InsertIntoHadoopFsRelationCommand`, `

sparkSession.sessionState.catalog.listPartitions

` will call method `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` 
of hive metastore client, this method will produce multiple queries per 
partition on hive metastore db. When you insert into a table which has too many 
partitions(ie: 10k), it will produce too many queries on hive metastore db(ie: 
n * 10k = 10nk), it puts a lot of strain on the database.

In fact, it calls method `listPartitions` in order to get locations of 
partitions and get `customPartitionLocations`. But in most cases, we do not 
have custom partitions, so we can just get partition names.


> InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions 
> in most cases
> ---
>
> Key: SPARK-38230
> URL: https://issues.apache.org/jira/browse/SPARK-38230
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.2
>Reporter: Coal Chan
>Priority: Major
>
> In `org.apache.spark.sql.execution.datasources.
> InsertIntoHadoopFsRelationCommand`, `
> sparkSession.sessionState.catalog.listPartitions
> ` will call method 
> `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
> client, this method will produce multiple queries per partition on hive 
> metastore db. When you insert into a table which has too many partitions(ie: 
> 10k), it will produce too many queries on hive metastore db(ie: n * 10k = 
> 10nk), it puts a lot of strain on the database.
> In fact, it calls method `listPartitions` in order to get locations of 
> partitions and get `customPartitionLocations`. But in most cases, we do not 
> have custom partitions, we can just get partition names, so we can call 
> method listPartitionNames.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-38230) InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions in most cases

2022-02-16 Thread Coal Chan (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-38230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Coal Chan updated SPARK-38230:
--
Description: 
In `org.apache.spark.sql.execution.datasources.

InsertIntoHadoopFsRelationCommand`, `

sparkSession.sessionState.catalog.listPartitions

` will call method `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` 
of hive metastore client, this method will produce multiple queries per 
partition on hive metastore db. When you insert into a table which has too many 
partitions(ie: 10k), it will produce too many queries on hive metastore db(ie: 
n * 10k = 10nk), it puts a lot of strain on the database.

In fact, it calls method `listPartitions` in order to get locations of 
partitions and get `customPartitionLocations`. But in most cases, we do not 
have custom partitions, so we can just get partition names.

  was:
In `org.apache.spark.sql.execution.datasources.

InsertIntoHadoopFsRelationCommand`, `

sparkSession.sessionState.catalog.listPartitions

` will call method `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` 
of hive metastore client, this method will produce multiple queries on hive 
metastore db. When you insert into a table which has too many partitions(ie: 
10k), it will produce too many queries on hive metastore db(ie: n * 10k = 
10nk), it puts a lot of strain on the database.

In fact, it calls method `listPartitions` in order to get locations of 
partitions and get `customPartitionLocations`. But in most cases, we do not 
have custom partitions, so we can just get partition names.


> InsertIntoHadoopFsRelationCommand unnecessarily fetches details of partitions 
> in most cases
> ---
>
> Key: SPARK-38230
> URL: https://issues.apache.org/jira/browse/SPARK-38230
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.2
>Reporter: Coal Chan
>Priority: Major
>
> In `org.apache.spark.sql.execution.datasources.
> InsertIntoHadoopFsRelationCommand`, `
> sparkSession.sessionState.catalog.listPartitions
> ` will call method 
> `org.apache.hadoop.hive.metastore.listPartitionsPsWithAuth` of hive metastore 
> client, this method will produce multiple queries per partition on hive 
> metastore db. When you insert into a table which has too many partitions(ie: 
> 10k), it will produce too many queries on hive metastore db(ie: n * 10k = 
> 10nk), it puts a lot of strain on the database.
> In fact, it calls method `listPartitions` in order to get locations of 
> partitions and get `customPartitionLocations`. But in most cases, we do not 
> have custom partitions, so we can just get partition names.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org