Skip to content

Commit

Permalink
Comment for ByteArrayOutputStreamWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
liurenjie1024 committed Jan 14, 2025
1 parent 8c73452 commit 73645c3
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (c) 2025, 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.jni.kudo;

import static java.lang.Math.toIntExact;
Expand All @@ -9,6 +25,10 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
* Adapter class which helps to save memory copy when shuffle manager uses {@link ByteArrayOutputStream} during
* serialization.
*/
public class ByteArrayOutputStreamWriter implements DataWriter {
private static final Method ENSURE_CAPACITY;
private static final Field BUF;
Expand Down

0 comments on commit 73645c3

Please sign in to comment.