@Test public void testIsHDFS() throws Exception { HBaseTestingUtility htu = new HBaseTestingUtility(); htu.getConfiguration().setBoolean("dfs.support.append", false); assertFalse(FSUtils.isHDFS(htu.getConfiguration())); htu.getConfiguration().setBoolean("dfs.support.append", true); MiniDFSCluster cluster = null; try { cluster = htu.startMiniDFSCluster(1); assertTrue(FSUtils.isHDFS(htu.getConfiguration())); assertTrue(FSUtils.isAppendSupported(htu.getConfiguration())); } finally { if (cluster != null) cluster.shutdown(); } }
public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); }
FSUtils { public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } }
FSUtils { public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } protected  FSUtils(); }
FSUtils { public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } protected  FSUtils(); static boolean isStartingWithPath(final Path rootPath, final String path); static boolean isMatchingTail(final Path pathToSearch, String pathTail); static boolean isMatchingTail(final Path pathToSearch, final Path pathTail); static FSUtils getInstance(FileSystem fs, Configuration conf); static boolean deleteDirectory(final FileSystem fs, final Path dir); static long getDefaultBlockSize(final FileSystem fs, final Path path); static short getDefaultReplication(final FileSystem fs, final Path path); static int getDefaultBufferSize(final FileSystem fs); static FSDataOutputStream create(FileSystem fs, Path path,
      FsPermission perm, InetSocketAddress[] favoredNodes); static FSDataOutputStream create(FileSystem fs, Path path,
      FsPermission perm, boolean overwrite); static FsPermission getFilePermissions(final FileSystem fs,
      final Configuration conf, final String permssionConfKey); static void checkFileSystemAvailable(final FileSystem fs); static void checkDfsSafeMode(final Configuration conf); static String getVersion(FileSystem fs, Path rootdir); static void checkVersion(FileSystem fs, Path rootdir, boolean message); static void checkVersion(FileSystem fs, Path rootdir,
      boolean message, int wait, int retries); static void setVersion(FileSystem fs, Path rootdir); static void setVersion(FileSystem fs, Path rootdir, int wait, int retries); static void setVersion(FileSystem fs, Path rootdir, String version,
      int wait, int retries); static boolean checkClusterIdExists(FileSystem fs, Path rootdir,
      int wait); static ClusterId getClusterId(FileSystem fs, Path rootdir); static void setClusterId(FileSystem fs, Path rootdir, ClusterId clusterId,
      int wait); static Path validateRootPath(Path root); static String removeRootPath(Path path, final Configuration conf); static void waitOnSafeMode(final Configuration conf,
    final long wait); static String getPath(Path p); static Path getRootDir(final Configuration c); static void setRootDir(final Configuration c, final Path root); static void setFsDefault(final Configuration c, final Path root); @SuppressWarnings("deprecation") static boolean metaRegionExists(FileSystem fs, Path rootdir); static HDFSBlocksDistribution computeHDFSBlocksDistribution(
    final FileSystem fs, FileStatus status, long start, long length); static boolean isMajorCompacted(final FileSystem fs,
      final Path hbaseRootDir); static int getTotalTableFragmentation(final HMaster master); static Map<String, Integer> getTableFragmentation(
    final HMaster master); static Map<String, Integer> getTableFragmentation(
    final FileSystem fs, final Path hbaseRootDir); static boolean isPre020FileLayout(final FileSystem fs,
    final Path hbaseRootDir); static boolean isMajorCompactedPre020(final FileSystem fs,
      final Path hbaseRootDir); static Path getTableDir(Path rootdir, final TableName tableName); static TableName getTableName(Path tablePath); static Path getNamespaceDir(Path rootdir, final String namespace); static boolean isAppendSupported(final Configuration conf); static boolean isHDFS(final Configuration conf); abstract void recoverFileLease(final FileSystem fs, final Path p,
      Configuration conf, CancelableProgressable reporter); static List<Path> getTableDirs(final FileSystem fs, final Path rootdir); static List<Path> getLocalTableDirs(final FileSystem fs, final Path rootdir); static boolean isRecoveredEdits(Path path); static List<Path> getRegionDirs(final FileSystem fs, final Path tableDir); static List<Path> getFamilyDirs(final FileSystem fs, final Path regionDir); static FileSystem getCurrentFileSystem(Configuration conf); static Map<String, Path> getTableStoreFilePathMap(Map<String, Path> map,
  final FileSystem fs, final Path hbaseRootDir, TableName tableName); static Map<String, Path> getTableStoreFilePathMap(
    final FileSystem fs, final Path hbaseRootDir); static FileStatus [] listStatus(final FileSystem fs,
      final Path dir, final PathFilter filter); static FileStatus[] listStatus(final FileSystem fs, final Path dir); static boolean delete(final FileSystem fs, final Path path, final boolean recursive); static boolean isExists(final FileSystem fs, final Path path); static void checkAccess(UserGroupInformation ugi, FileStatus file,
      FsAction action); static void logFileSystemState(final FileSystem fs, final Path root, Log LOG); static boolean renameAndSetModifyTime(final FileSystem fs, final Path src, final Path dest); static Map<String, Map<String, Float>> getRegionDegreeLocalityMappingFromFS(
      final Configuration conf); static Map<String, Map<String, Float>> getRegionDegreeLocalityMappingFromFS(
      final Configuration conf, final String desiredTable, int threadPoolSize); static void setupShortCircuitRead(final Configuration conf); static void checkShortCircuitReadBufferSize(final Configuration conf); }
FSUtils { public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } protected  FSUtils(); static boolean isStartingWithPath(final Path rootPath, final String path); static boolean isMatchingTail(final Path pathToSearch, String pathTail); static boolean isMatchingTail(final Path pathToSearch, final Path pathTail); static FSUtils getInstance(FileSystem fs, Configuration conf); static boolean deleteDirectory(final FileSystem fs, final Path dir); static long getDefaultBlockSize(final FileSystem fs, final Path path); static short getDefaultReplication(final FileSystem fs, final Path path); static int getDefaultBufferSize(final FileSystem fs); static FSDataOutputStream create(FileSystem fs, Path path,
      FsPermission perm, InetSocketAddress[] favoredNodes); static FSDataOutputStream create(FileSystem fs, Path path,
      FsPermission perm, boolean overwrite); static FsPermission getFilePermissions(final FileSystem fs,
      final Configuration conf, final String permssionConfKey); static void checkFileSystemAvailable(final FileSystem fs); static void checkDfsSafeMode(final Configuration conf); static String getVersion(FileSystem fs, Path rootdir); static void checkVersion(FileSystem fs, Path rootdir, boolean message); static void checkVersion(FileSystem fs, Path rootdir,
      boolean message, int wait, int retries); static void setVersion(FileSystem fs, Path rootdir); static void setVersion(FileSystem fs, Path rootdir, int wait, int retries); static void setVersion(FileSystem fs, Path rootdir, String version,
      int wait, int retries); static boolean checkClusterIdExists(FileSystem fs, Path rootdir,
      int wait); static ClusterId getClusterId(FileSystem fs, Path rootdir); static void setClusterId(FileSystem fs, Path rootdir, ClusterId clusterId,
      int wait); static Path validateRootPath(Path root); static String removeRootPath(Path path, final Configuration conf); static void waitOnSafeMode(final Configuration conf,
    final long wait); static String getPath(Path p); static Path getRootDir(final Configuration c); static void setRootDir(final Configuration c, final Path root); static void setFsDefault(final Configuration c, final Path root); @SuppressWarnings("deprecation") static boolean metaRegionExists(FileSystem fs, Path rootdir); static HDFSBlocksDistribution computeHDFSBlocksDistribution(
    final FileSystem fs, FileStatus status, long start, long length); static boolean isMajorCompacted(final FileSystem fs,
      final Path hbaseRootDir); static int getTotalTableFragmentation(final HMaster master); static Map<String, Integer> getTableFragmentation(
    final HMaster master); static Map<String, Integer> getTableFragmentation(
    final FileSystem fs, final Path hbaseRootDir); static boolean isPre020FileLayout(final FileSystem fs,
    final Path hbaseRootDir); static boolean isMajorCompactedPre020(final FileSystem fs,
      final Path hbaseRootDir); static Path getTableDir(Path rootdir, final TableName tableName); static TableName getTableName(Path tablePath); static Path getNamespaceDir(Path rootdir, final String namespace); static boolean isAppendSupported(final Configuration conf); static boolean isHDFS(final Configuration conf); abstract void recoverFileLease(final FileSystem fs, final Path p,
      Configuration conf, CancelableProgressable reporter); static List<Path> getTableDirs(final FileSystem fs, final Path rootdir); static List<Path> getLocalTableDirs(final FileSystem fs, final Path rootdir); static boolean isRecoveredEdits(Path path); static List<Path> getRegionDirs(final FileSystem fs, final Path tableDir); static List<Path> getFamilyDirs(final FileSystem fs, final Path regionDir); static FileSystem getCurrentFileSystem(Configuration conf); static Map<String, Path> getTableStoreFilePathMap(Map<String, Path> map,
  final FileSystem fs, final Path hbaseRootDir, TableName tableName); static Map<String, Path> getTableStoreFilePathMap(
    final FileSystem fs, final Path hbaseRootDir); static FileStatus [] listStatus(final FileSystem fs,
      final Path dir, final PathFilter filter); static FileStatus[] listStatus(final FileSystem fs, final Path dir); static boolean delete(final FileSystem fs, final Path path, final boolean recursive); static boolean isExists(final FileSystem fs, final Path path); static void checkAccess(UserGroupInformation ugi, FileStatus file,
      FsAction action); static void logFileSystemState(final FileSystem fs, final Path root, Log LOG); static boolean renameAndSetModifyTime(final FileSystem fs, final Path src, final Path dest); static Map<String, Map<String, Float>> getRegionDegreeLocalityMappingFromFS(
      final Configuration conf); static Map<String, Map<String, Float>> getRegionDegreeLocalityMappingFromFS(
      final Configuration conf, final String desiredTable, int threadPoolSize); static void setupShortCircuitRead(final Configuration conf); static void checkShortCircuitReadBufferSize(final Configuration conf); static final String FULL_RWX_PERMISSIONS; static final boolean WINDOWS; }