jojochuang commented on code in PR #6342:
URL: https://github.com/apache/hbase/pull/6342#discussion_r1803610045
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java:
##########
@@ -247,8 +262,19 @@ public static void checkFileSystemAvailable(final
FileSystem fs) throws IOExcept
* @param dfs A DistributedFileSystem object representing the underlying
HDFS.
* @return whether we're in safe mode
*/
- private static boolean isInSafeMode(DistributedFileSystem dfs) throws
IOException {
- return dfs.setSafeMode(SAFEMODE_GET, true);
+ private static boolean isInSafeMode(FileSystem dfs) throws IOException {
+ if (isDistributedFileSystem(dfs)) {
+ return ((DistributedFileSystem) dfs).setSafeMode(SAFEMODE_GET, true);
+ } else {
+ try {
Review Comment:
Before calling isInSafeMode() it calls supportSafeMode(). If it's
LocalFileSystem it will not enter isInSafeMode().
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]