Skip to content

Commit

Permalink
Add spark312 and spark320 versions of cache serializer (#2264)
Browse files Browse the repository at this point in the history
* Add spark312 and spark320 versions of cache serializer

Signed-off-by: Jason Lowe <jlowe@nvidia.com>

* Update serializer docs
  • Loading branch information
jlowe authored Apr 26, 2021
1 parent 5de2f24 commit 37ef220
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/additional-functionality/cache-serializer.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,18 @@ nav_order: 2
ParquetCachedBatchSerializer does by decomposing intervals to struct containing the
months, days and microseconds and NullType to Int column containing nulls.

To use this serializer please run Spark
Please make sure to use the right package corresponding to the spark version you are using. To use
this serializer with Spark 3.1.1 please run Spark with the following conf.
```
spark-shell --conf spark.sql.cache.serializer=com.nvidia.spark.rapids.shims.spark311.ParquetCachedBatchSerializer"
```
Please see the below table for all the names of the serializers corresponding to the Spark
versions

| Spark version | Serializer name |
| ------ | -----|
| 3.1.1 | com.nvidia.spark.rapids.shims.spark311.ParquetCachedBatchSerializer |
| 3.1.2 | com.nvidia.spark.rapids.shims.spark312.ParquetCachedBatchSerializer |
| 3.2.0 | com.nvidia.spark.rapids.shims.spark320.ParquetCachedBatchSerializer |

To use the default serializer don't set the `spark.sql.cache.serializer` conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
*
* Licensed 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.
*/

package com.nvidia.spark.rapids.shims.spark312

import com.nvidia.spark.rapids.shims

class ParquetCachedBatchSerializer extends shims.spark311.ParquetCachedBatchSerializer {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
*
* Licensed 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.
*/

package com.nvidia.spark.rapids.shims.spark320

import com.nvidia.spark.rapids.shims

class ParquetCachedBatchSerializer extends shims.spark311.ParquetCachedBatchSerializer {
}

0 comments on commit 37ef220

Please sign in to comment.