This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new bc5d8e062cd remove duplicate log (#10055)
bc5d8e062cd is described below
commit bc5d8e062cd626301f32cb7d16531cfccbd9c672
Author: Alan Choo <[email protected]>
AuthorDate: Wed Jun 7 10:38:27 2023 +0800
remove duplicate log (#10055)
---
.../apache/iotdb/tsfile/fileSystem/FSFactoryProducer.java | 8 ++++++++
.../iotdb/tsfile/fileSystem/fsFactory/HDFSFactory.java | 8 --------
.../iotdb/tsfile/fileSystem/fsFactory/OSFSFactory.java | 13 +------------
3 files changed, 9 insertions(+), 20 deletions(-)
diff --git
a/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/FSFactoryProducer.java
b/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/FSFactoryProducer.java
index 09413d318a4..7694096e9fa 100644
---
a/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/FSFactoryProducer.java
+++
b/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/FSFactoryProducer.java
@@ -35,6 +35,10 @@ public class FSFactoryProducer {
return fsFactory;
}
+ public static void setFsFactory(FSFactory fsFactory) {
+ FSFactoryProducer.fsFactory = fsFactory;
+ }
+
public static FileInputFactory getFileInputFactory() {
return fileInputFactory;
}
@@ -46,4 +50,8 @@ public class FSFactoryProducer {
public static FileOutputFactory getFileOutputFactory() {
return fileOutputFactory;
}
+
+ public static void setFileOutputFactory(FileOutputFactory fileOutputFactory)
{
+ FSFactoryProducer.fileOutputFactory = fileOutputFactory;
+ }
}
diff --git
a/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fsFactory/HDFSFactory.java
b/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fsFactory/HDFSFactory.java
index fac32d0a756..26997879f2e 100644
---
a/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fsFactory/HDFSFactory.java
+++
b/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fsFactory/HDFSFactory.java
@@ -202,10 +202,6 @@ public class HDFSFactory implements FSFactory {
try {
renameTo.invoke(constructorWithPathname.newInstance(srcFile.getAbsolutePath()),
destFile);
} catch (InstantiationException | InvocationTargetException |
IllegalAccessException e) {
- logger.error(
- "Failed to rename file from {} to {}. Please check your dependency
of Hadoop module.",
- srcFile.getName(),
- destFile.getName());
throw new IOException(e);
}
}
@@ -225,10 +221,6 @@ public class HDFSFactory implements FSFactory {
constructorWithPathname.newInstance(srcFile.getAbsolutePath()),
destFile);
}
} catch (InstantiationException | InvocationTargetException |
IllegalAccessException e) {
- logger.error(
- "Failed to copy file from {} to {}. Please check your dependency of
object storage module.",
- srcFile.getName(),
- destFile.getName());
throw new IOException(e);
}
}
diff --git
a/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fsFactory/OSFSFactory.java
b/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fsFactory/OSFSFactory.java
index bed220c2b63..2d8927cfcec 100644
---
a/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fsFactory/OSFSFactory.java
+++
b/tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fsFactory/OSFSFactory.java
@@ -201,10 +201,6 @@ public class OSFSFactory implements FSFactory {
try {
renameTo.invoke(srcFile, destFile);
} catch (InvocationTargetException | IllegalAccessException e) {
- logger.error(
- "Failed to rename file from {} to {}. Please check your dependency
of object storage module.",
- srcFile.getName(),
- destFile.getName());
throw new IOException(e);
}
}
@@ -223,10 +219,6 @@ public class OSFSFactory implements FSFactory {
"Doesn't support copy file from %s to %s.", srcType,
FSType.OBJECT_STORAGE));
}
} catch (InvocationTargetException | IllegalAccessException e) {
- logger.error(
- "Failed to copy file from {} to {}. Please check your dependency of
object storage module.",
- srcFile.getName(),
- destFile.getName());
throw new IOException(e);
}
}
@@ -273,10 +265,7 @@ public class OSFSFactory implements FSFactory {
try {
deleteObjectsByPrefix.invoke(constructorWithPathname.newInstance(dir));
} catch (InstantiationException | InvocationTargetException |
IllegalAccessException e) {
- logger.error(
- "Failed to delete directory {}. Please check your dependency of
object storage module.",
- dir,
- e);
+ throw new IOException(e);
}
}
}