@Test public void removeEndKeyTest() { String regionName = "hbase:meta,,1.."; assertEquals("hbase:meta,", removeEndKey(regionName)); regionName = "hbase:meta,0,1.."; assertEquals("hbase:meta,0", removeEndKey(regionName)); regionName = ""; assertEquals("", removeEndKey(regionName)); regionName = " "; assertEquals(" ", removeEndKey(regionName)); }
public static String removeEndKey(String regionName) { if (!validRegionName(regionName)) return regionName; return regionName.substring(0, regionName.lastIndexOf(",")).trim(); }
HBaseUtils { public static String removeEndKey(String regionName) { if (!validRegionName(regionName)) return regionName; return regionName.substring(0, regionName.lastIndexOf(",")).trim(); } }
HBaseUtils { public static String removeEndKey(String regionName) { if (!validRegionName(regionName)) return regionName; return regionName.substring(0, regionName.lastIndexOf(",")).trim(); } private  HBaseUtils(); }
HBaseUtils { public static String removeEndKey(String regionName) { if (!validRegionName(regionName)) return regionName; return regionName.substring(0, regionName.lastIndexOf(",")).trim(); } private  HBaseUtils(); static HBaseUtils getInstance(); static void setUpEnv(); static boolean createTable(Admin admin, HTableDescriptor table, byte[][] splits); static String getNameSpace(RegionLoad region); static String getSingleTableName(RegionLoad region); static String getTableName(RegionLoad region); static String extractTableName(String regionName); static LinkedList<String> splitJmxRegion(String aim); static String removeEndKey(String regionName); static String extractTimestamp4Region(String regionName); static String extractHostName(String regionServerName); static String removeTimestamp(String regionServerName); static String extractTimestamp4RS(String regionServerName); static String generateSplitKeys(int startKey, int endKey, int stepSize, int fill); static byte[][] getHexSplits(String startKey, String endKey, int numRegions); Date getClusterStartTime(); String getClusterStartTimeStr(); }
HBaseUtils { public static String removeEndKey(String regionName) { if (!validRegionName(regionName)) return regionName; return regionName.substring(0, regionName.lastIndexOf(",")).trim(); } private  HBaseUtils(); static HBaseUtils getInstance(); static void setUpEnv(); static boolean createTable(Admin admin, HTableDescriptor table, byte[][] splits); static String getNameSpace(RegionLoad region); static String getSingleTableName(RegionLoad region); static String getTableName(RegionLoad region); static String extractTableName(String regionName); static LinkedList<String> splitJmxRegion(String aim); static String removeEndKey(String regionName); static String extractTimestamp4Region(String regionName); static String extractHostName(String regionServerName); static String removeTimestamp(String regionServerName); static String extractTimestamp4RS(String regionServerName); static String generateSplitKeys(int startKey, int endKey, int stepSize, int fill); static byte[][] getHexSplits(String startKey, String endKey, int numRegions); Date getClusterStartTime(); String getClusterStartTimeStr();  }