From e141e957cc1189b39fd862ab593164807e71250d Mon Sep 17 00:00:00 2001 From: Yang Yu Date: Tue, 23 Jan 2024 16:28:42 +0800 Subject: [PATCH] fix: fix the returning type for the create method of CosNMappoedBufferFactory Signed-off-by: Yang Yu --- .../apache/hadoop/fs/cosn/buffer/CosNMappedBufferFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/hadoop/fs/cosn/buffer/CosNMappedBufferFactory.java b/src/main/java/org/apache/hadoop/fs/cosn/buffer/CosNMappedBufferFactory.java index ed39035d..5a678e28 100644 --- a/src/main/java/org/apache/hadoop/fs/cosn/buffer/CosNMappedBufferFactory.java +++ b/src/main/java/org/apache/hadoop/fs/cosn/buffer/CosNMappedBufferFactory.java @@ -60,7 +60,7 @@ private static File createDir(String tmpDir) throws IOException { } @Override - public CosNMappedBuffer create(int size) { + public CosNByteBuffer create(int size) { return this.create(Constants.BLOCK_TMP_FILE_PREFIX, Constants.BLOCK_TMP_FILE_SUFFIX, size); } @@ -71,7 +71,7 @@ private File getTmpDir() { return tmpDirs.get(Math.abs(currentIndex.getAndIncrement() % tmpDirs.size())); } - public CosNMappedBuffer create(String prefix, String suffix, int size) { + public CosNByteBuffer create(String prefix, String suffix, int size) { File tmpDir = getTmpDir(); if (null == tmpDir) { LOG.error("The tmp dir is null. no mapped buffer will be created.");