This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch rel/1.2
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.2 by this push:
new 825b596e252 remove duplicate log (#10064)
825b596e252 is described below
commit 825b596e252ae19330bd573bcc8969c39b46216c
Author: Alan Choo <[email protected]>
AuthorDate: Wed Jun 7 14:09:26 2023 +0800
remove duplicate log (#10064)
---
.../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..c2f81c026e8 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
@@ -39,6 +39,10 @@ public class FSFactoryProducer {
return fileInputFactory;
}
+ public static void setFsFactory(FSFactory fsFactory) {
+ FSFactoryProducer.fsFactory = fsFactory;
+ }
+
public static void setFileInputFactory(FileInputFactory fileInputFactory) {
FSFactoryProducer.fileInputFactory = 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);
}
}
}