private Pair<RecordWriter, Function<RowData, Writable>> getRecordWriterAndRowConverter(
            HiveWriterFactory writerFactory, Path inProgressFilePath) {
        FileSinkOperator.RecordWriter recordWriter;
        Function<RowData, Writable> rowConverter;
        if (!CacheHolder.getRecordWriterHashMap().containsKey(inProgressFilePath)) {
            recordWriter = writerFactory.createRecordWriter(inProgressFilePath);
            rowConverter = writerFactory.createRowDataConverter();
            CacheHolder.getRecordWriterHashMap().put(inProgressFilePath, recordWriter);
            CacheHolder.getRowConverterHashMap().put(inProgressFilePath, rowConverter);
        } else {
            recordWriter = CacheHolder.getRecordWriterHashMap().get(inProgressFilePath);
            rowConverter = CacheHolder.getRowConverterHashMap().get(inProgressFilePath);
        }
        return new ImmutablePair<>(recordWriter, rowConverter);
    }
get hive record writer and row converter

@param writerFactory hive writer factory
@param inProgressFilePath temp hdfs file path for writing data
@return pair of hive record writer and row converter objects
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/hive/src/main/java/org/apache/inlong/sort/hive/filesystem/HadoopPathBasedPartFileWriter.java