Java Code Examples for org.apache.hadoop.fs.swift.util.SwiftUtils#isRootDir()
The following examples show how to use
org.apache.hadoop.fs.swift.util.SwiftUtils#isRootDir() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwiftNativeFileSystemStore.java From sahara-extra with Apache License 2.0 | 6 votes |
/** * deletes object from Swift * * @param status FileStatus to delete * @return true if the path was deleted by this specific operation. * @throws IOException on a failure */ public boolean deleteObject(FileStatus status) throws IOException { SwiftObjectPath swiftObjectPath; if (status.isDir()) { swiftObjectPath = toDirPath(status.getPath()); } else { swiftObjectPath = toObjectPath(status.getPath()); } if (!SwiftUtils.isRootDir(swiftObjectPath)) { return swiftRestClient.delete(swiftObjectPath); } else { if (LOG.isDebugEnabled()) { LOG.debug("Not deleting root directory entry"); } return true; } }
Example 2
Source File: SwiftNativeFileSystemStore.java From hadoop with Apache License 2.0 | 5 votes |
/** * deletes object from Swift * * @param path path to delete * @return true if the path was deleted by this specific operation. * @throws IOException on a failure */ public boolean deleteObject(Path path) throws IOException { SwiftObjectPath swiftObjectPath = toObjectPath(path); if (!SwiftUtils.isRootDir(swiftObjectPath)) { return swiftRestClient.delete(swiftObjectPath); } else { if (LOG.isDebugEnabled()) { LOG.debug("Not deleting root directory entry"); } return true; } }
Example 3
Source File: SwiftNativeFileSystemStore.java From big-c with Apache License 2.0 | 5 votes |
/** * deletes object from Swift * * @param path path to delete * @return true if the path was deleted by this specific operation. * @throws IOException on a failure */ public boolean deleteObject(Path path) throws IOException { SwiftObjectPath swiftObjectPath = toObjectPath(path); if (!SwiftUtils.isRootDir(swiftObjectPath)) { return swiftRestClient.delete(swiftObjectPath); } else { if (LOG.isDebugEnabled()) { LOG.debug("Not deleting root directory entry"); } return true; } }