yaooqinn commented on a change in pull request #2057: URL: https://github.com/apache/incubator-kyuubi/pull/2057#discussion_r821280513
########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for big result set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and Review comment: Normally -> Typically, user -> a user, sumbits -> submits, retrieve all partitions from all Worker nodes, -> collect the entire data set of all tasks(a.k.a, partitions of an RDD). ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for big result set Review comment: set -> sets ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. + +## Incremental collection + +Since v1.4.0-incubating, Kyuubi supports incremental collect mode, it is a solution for big results set. This feature +is disabled in default, you can turn on it by setting the internal[1] configuration +`kyuubi.operation.incremental.collect` to `true`. + +Incremental collection changes the gather method from `collect` to `toLocalIterator`. `toLocalIterator` is a Spark +action which sequentially submit Jobs to retrieve partitions. As each partition is retrieved, the Driver sends it back Review comment: that sequentially submits ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. + +## Incremental collection + +Since v1.4.0-incubating, Kyuubi supports incremental collect mode, it is a solution for big results set. This feature Review comment: incremental collection mode, a solution for big ~~results set~~ result sets ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. + +## Incremental collection + +Since v1.4.0-incubating, Kyuubi supports incremental collect mode, it is a solution for big results set. This feature +is disabled in default, you can turn on it by setting the internal[1] configuration +`kyuubi.operation.incremental.collect` to `true`. + +Incremental collection changes the gather method from `collect` to `toLocalIterator`. `toLocalIterator` is a Spark +action which sequentially submit Jobs to retrieve partitions. As each partition is retrieved, the Driver sends it back Review comment: same as above, then driver does not `send` ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for big result set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. Review comment: > after all partitions data arrived, then Driver sends the data back to client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. this is not correct, the driver not `send`, the result are pulled by clients Not good to put code in the doc for end-users, `TFetchResultsReq.maxRows` when there are alternatives. ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for big result set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration Review comment: Therefore, for query has big result set, the bottleneck is the Spark Driver, -> Therefore, the bottleneck is the Spark Driver for a query with a big result set. ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. + +## Incremental collection + +Since v1.4.0-incubating, Kyuubi supports incremental collect mode, it is a solution for big results set. This feature +is disabled in default, you can turn on it by setting the internal[1] configuration Review comment: > setting the internal[1] configuration in [1], you said you can not find in the doc, when users actually read the whole doc you write? ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. + +## Incremental collection + +Since v1.4.0-incubating, Kyuubi supports incremental collect mode, it is a solution for big results set. This feature +is disabled in default, you can turn on it by setting the internal[1] configuration +`kyuubi.operation.incremental.collect` to `true`. + +Incremental collection changes the gather method from `collect` to `toLocalIterator`. `toLocalIterator` is a Spark Review comment: The in... ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. + +## Incremental collection + +Since v1.4.0-incubating, Kyuubi supports incremental collect mode, it is a solution for big results set. This feature +is disabled in default, you can turn on it by setting the internal[1] configuration Review comment: turn it on ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. Review comment: It would be best if you have `incremental collection` mode. ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for big result set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration Review comment: to avoid OOM -> To avoid OOM ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. + +## Incremental collection + +Since v1.4.0-incubating, Kyuubi supports incremental collect mode, it is a solution for big results set. This feature +is disabled in default, you can turn on it by setting the internal[1] configuration Review comment: default. You ########## File path: docs/deployment/incremental_collection.md ########## @@ -0,0 +1,129 @@ +<!-- + - 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. + --> + +<div align=center> + + + +</div> + +# Solution for Big Result Set + +Normally, when user sumbits a SELECT query to Spark SQL engine, the Driver calls `collect` to trigger calculation and +retrieve all partitions from all Worker nodes, after all partitions data arrived, then Driver sends the data back to +client through Kyuubi Server streamingly in small batch, the batch size decided by `TFetchResultsReq.maxRows`. + +Therefore, for query has big result set, the bottleneck is the Spark Driver, to avoid OOM, Spark has a configuration +`spark.driver.maxResultSize` which default is `1g`, you should enlarge it as well as `spark.driver.memory` if your +query has result set in several GB. But what if the result set size is dozens GB or event hundreds GB? You need +incremental collection. + +## Incremental collection + +Since v1.4.0-incubating, Kyuubi supports incremental collect mode, it is a solution for big results set. This feature +is disabled in default, you can turn on it by setting the internal[1] configuration +`kyuubi.operation.incremental.collect` to `true`. + +Incremental collection changes the gather method from `collect` to `toLocalIterator`. `toLocalIterator` is a Spark +action which sequentially submit Jobs to retrieve partitions. As each partition is retrieved, the Driver sends it back +to the client through Kyuubi Server streamingly. It reduces the amount of heap memory required on the Driver – from Review comment: It reduces the amount of heap memory required on the Driver... -> It reduces the Driver memory significantly from the size of the complete result set to the maximum partition. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
