@Test public void testIsHDFS() throws Exception { HBaseTestingUtility htu = new HBaseTestingUtility(); htu.getConfiguration().setBoolean("dfs.support.append", false); assertFalse(FSUtils.isHDFS(htu.getConfiguration())); assertFalse(FSUtils.isAppendSupported(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"); } private  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"); } private  FSUtils(); static boolean deleteDirectory(final FileSystem fs, final Path dir); Path checkdir(final FileSystem fs, final Path dir); static Path create(final FileSystem fs, final Path p); static void checkFileSystemAvailable(final FileSystem fs); 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); static void setVersion(FileSystem fs, Path rootdir); static void setVersion(FileSystem fs, Path rootdir, int wait); static void setVersion(FileSystem fs, Path rootdir, String version,
      int wait); static Path validateRootPath(Path root); static void waitOnSafeMode(final Configuration conf,
    final long wait); static String getPath(Path p); static Path getRootDir(final Configuration c); static boolean rootRegionExists(FileSystem fs, Path rootdir); 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 boolean isAppendSupported(final Configuration conf); static boolean isHDFS(final Configuration conf); static void recoverFileLease(final FileSystem fs, final Path p, 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"); } private  FSUtils(); static boolean deleteDirectory(final FileSystem fs, final Path dir); Path checkdir(final FileSystem fs, final Path dir); static Path create(final FileSystem fs, final Path p); static void checkFileSystemAvailable(final FileSystem fs); 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); static void setVersion(FileSystem fs, Path rootdir); static void setVersion(FileSystem fs, Path rootdir, int wait); static void setVersion(FileSystem fs, Path rootdir, String version,
      int wait); static Path validateRootPath(Path root); static void waitOnSafeMode(final Configuration conf,
    final long wait); static String getPath(Path p); static Path getRootDir(final Configuration c); static boolean rootRegionExists(FileSystem fs, Path rootdir); 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 boolean isAppendSupported(final Configuration conf); static boolean isHDFS(final Configuration conf); static void recoverFileLease(final FileSystem fs, final Path p, Configuration conf);  }