@Test public void compareTierNames() { Assert.assertTrue("MEM should be placed before SSD", FileSystemAdminShellUtils.compareTierNames("MEM", "SSD") < 0); Assert.assertTrue("MEM should be placed before HDD", FileSystemAdminShellUtils.compareTierNames("MEM", "HDD") < 0); Assert.assertTrue("HDD should be placed after SSD", FileSystemAdminShellUtils.compareTierNames("HDD", "SSD") > 0); Assert.assertTrue("HDD should be placed before DOM", FileSystemAdminShellUtils.compareTierNames("DOM", "HDD") > 0); Assert.assertTrue("RAM should be placed after DOM", FileSystemAdminShellUtils.compareTierNames("RAM", "DOM") > 0); }
public static int compareTierNames(String a, String b) { int aValue = getTierRankValue(a); int bValue = getTierRankValue(b); if (aValue == bValue) { return a.compareTo(b); } return aValue - bValue; }
FileSystemAdminShellUtils { public static int compareTierNames(String a, String b) { int aValue = getTierRankValue(a); int bValue = getTierRankValue(b); if (aValue == bValue) { return a.compareTo(b); } return aValue - bValue; } }
FileSystemAdminShellUtils { public static int compareTierNames(String a, String b) { int aValue = getTierRankValue(a); int bValue = getTierRankValue(b); if (aValue == bValue) { return a.compareTo(b); } return aValue - bValue; } private  FileSystemAdminShellUtils(); }
FileSystemAdminShellUtils { public static int compareTierNames(String a, String b) { int aValue = getTierRankValue(a); int bValue = getTierRankValue(b); if (aValue == bValue) { return a.compareTo(b); } return aValue - bValue; } private  FileSystemAdminShellUtils(); static int compareTierNames(String a, String b); static void checkMasterClientService(AlluxioConfiguration alluxioConf); }
FileSystemAdminShellUtils { public static int compareTierNames(String a, String b) { int aValue = getTierRankValue(a); int bValue = getTierRankValue(b); if (aValue == bValue) { return a.compareTo(b); } return aValue - bValue; } private  FileSystemAdminShellUtils(); static int compareTierNames(String a, String b); static void checkMasterClientService(AlluxioConfiguration alluxioConf);  }