List of usage examples for java.util ConcurrentModificationException toString
public String toString()
From source file:org.apache.hadoop.hbase.MultiRegionTable.java
private static void compact(final MiniHBaseCluster cluster, final HRegionInfo r) throws IOException { LOG.info("Starting compaction"); for (MiniHBaseCluster.RegionServerThread thread : cluster.regionThreads) { SortedMap<Text, HRegion> regions = thread.getRegionServer().onlineRegions; // Retry if ConcurrentModification... alternative of sync'ing is not // worth it for sake of unit test. for (int i = 0; i < 10; i++) { try { for (HRegion online : regions.values()) { if (online.getRegionName().toString().equals(r.getRegionName().toString())) { online.compactStores(); }// w ww.j a v a 2 s . c o m } break; } catch (ConcurrentModificationException e) { LOG.warn("Retrying because ..." + e.toString() + " -- one or " + "two should be fine"); continue; } } } }