[25/35] hbase-site git commit: Published site at .
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/04d647a7/devapidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.html b/devapidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.html index 1451196..c472f61 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.html @@ -28,15 +28,15 @@ 020 021import java.io.IOException; 022import java.util.ArrayList; -023import java.util.Collection; -024import java.util.Collections; -025import java.util.HashMap; -026import java.util.HashSet; -027import java.util.LinkedList; -028import java.util.List; -029import java.util.Map; -030import java.util.Set; -031import java.util.TreeMap; +023import java.util.Collections; +024import java.util.HashMap; +025import java.util.HashSet; +026import java.util.LinkedList; +027import java.util.List; +028import java.util.Map; +029import java.util.Set; +030import java.util.TreeMap; +031 032import org.apache.hadoop.conf.Configuration; 033import org.apache.hadoop.hbase.ClusterMetrics; 034import org.apache.hadoop.hbase.HBaseIOException; @@ -296,154 +296,158 @@ 288 * List of servers which are online. 289 * @return the list 290 */ -291 private ListfilterServers(Collection servers, -292 Collection onlineServers) { -293ArrayList finalList = new ArrayList (); -294for (Address server : servers) { -295 for(ServerName curr: onlineServers) { -296 if(curr.getAddress().equals(server)) { -297 finalList.add(curr); -298} -299 } -300} -301return finalList; -302 } -303 -304 @VisibleForTesting -305 public Set getMisplacedRegions( -306 Map regions) throws IOException { -307Set misplacedRegions = new HashSet<>(); -308for(Map.Entry region : regions.entrySet()) { -309 RegionInfo regionInfo = region.getKey(); -310 ServerName assignedServer = region.getValue(); -311 RSGroupInfo info = rsGroupInfoManager.getRSGroup(rsGroupInfoManager. -312 getRSGroupOfTable(regionInfo.getTable())); -313 if (assignedServer == null) { -314LOG.debug("There is no assigned server for {}", region); -315continue; -316 } -317 RSGroupInfo otherInfo = rsGroupInfoManager.getRSGroupOfServer(assignedServer.getAddress()); -318 if (info == null && otherInfo == null) { -319LOG.warn("Couldn't obtain rs group information for {} on {}", region, assignedServer); -320continue; -321 } -322 if ((info == null || !info.containsServer(assignedServer.getAddress( { -323LOG.debug("Found misplaced region: " + regionInfo.getRegionNameAsString() + -324" on server: " + assignedServer + -325" found in group: " + otherInfo + -326" outside of group: " + (info == null ? "UNKNOWN" : info.getName())); -327 misplacedRegions.add(regionInfo); -328 } -329} -330return misplacedRegions; -331 } -332 -333 private ServerName findServerForRegion( -334 Map > existingAssignments, RegionInfo region) { -335for (Map.Entry > entry : existingAssignments.entrySet()) { -336 if (entry.getValue().contains(region)) { -337return entry.getKey(); -338 } -339} -340 -341throw new IllegalStateException("Could not find server for region " -342+ region.getShortNameToLog()); -343 } +291 private List filterServers(Set servers, +292 List onlineServers) { +293/** +294 * servers is actually a TreeSet (see {@link org.apache.hadoop.hbase.rsgroup.RSGroupInfo}), +295 * having its contains()'s time complexity as O(logn), which is good enough. +296 * TODO: consider using HashSet to pursue O(1) for contains() throughout the calling chain +297 * if needed. */ +298ArrayList finalList = new ArrayList<>(); +299for (ServerName onlineServer : onlineServers) { +300 if (servers.contains(onlineServer.getAddress())) { +301finalList.add(onlineServer); +302 } +303} +304 +305return finalList; +306 } +307 +308 @VisibleForTesting +309 public Set getMisplacedRegions( +310 Map regions) throws IOException { +311Set misplacedRegions = new HashSet<>(); +312for(Map.Entry region : regions.entrySet()) { +313 RegionInfo regionInfo = region.getKey(); +314 ServerName assignedServer = region.getValue();
[25/35] hbase-site git commit: Published site at 42d5447cfbc593becfc26684e03f482eb3a0fc49.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/a610f23a/testdevapidocs/org/apache/hadoop/hbase/package-tree.html -- diff --git a/testdevapidocs/org/apache/hadoop/hbase/package-tree.html b/testdevapidocs/org/apache/hadoop/hbase/package-tree.html index 42aea6a..6bddba3 100644 --- a/testdevapidocs/org/apache/hadoop/hbase/package-tree.html +++ b/testdevapidocs/org/apache/hadoop/hbase/package-tree.html @@ -570,14 +570,14 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true"; title="class or interface in java.lang">Enum(implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true"; title="class or interface in java.lang">Comparable , java.io.https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true"; title="class or interface in java.io">Serializable) org.apache.hadoop.hbase.ClusterManager.ServiceType +org.apache.hadoop.hbase.PerformanceEvaluation.Counter +org.apache.hadoop.hbase.ResourceChecker.Phase +org.apache.hadoop.hbase.IntegrationTestDDLMasterFailover.ACTION org.apache.hadoop.hbase.IntegrationTestRegionReplicaPerf.Stat -org.apache.hadoop.hbase.RESTApiClusterManager.Service org.apache.hadoop.hbase.HBaseClusterManager.CommandProvider.Operation -org.apache.hadoop.hbase.RESTApiClusterManager.RoleCommand org.apache.hadoop.hbase.ScanPerformanceEvaluation.ScanCounter -org.apache.hadoop.hbase.IntegrationTestDDLMasterFailover.ACTION -org.apache.hadoop.hbase.ResourceChecker.Phase -org.apache.hadoop.hbase.PerformanceEvaluation.Counter +org.apache.hadoop.hbase.RESTApiClusterManager.RoleCommand +org.apache.hadoop.hbase.RESTApiClusterManager.Service http://git-wip-us.apache.org/repos/asf/hbase-site/blob/a610f23a/testdevapidocs/org/apache/hadoop/hbase/procedure/package-tree.html -- diff --git a/testdevapidocs/org/apache/hadoop/hbase/procedure/package-tree.html b/testdevapidocs/org/apache/hadoop/hbase/procedure/package-tree.html index 28973e0..a1c9b1d 100644 --- a/testdevapidocs/org/apache/hadoop/hbase/procedure/package-tree.html +++ b/testdevapidocs/org/apache/hadoop/hbase/procedure/package-tree.html @@ -81,14 +81,14 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true"; title="class or interface in java.lang">Object -org.apache.hadoop.hbase.procedure2.Procedure (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true"; title="class or interface in java.lang">Comparable ) +org.apache.hadoop.hbase.procedure.Procedure (implements java.util.concurrent.https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Callable.html?is-external=true"; title="class or interface in java.util.concurrent">Callable , org.apache.hadoop.hbase.errorhandling.ForeignExceptionListener) -org.apache.hadoop.hbase.procedure.TestProcedureDescriber.TestProcedure +org.apache.hadoop.hbase.procedure.TestProcedure.LatchedProcedure -org.apache.hadoop.hbase.procedure.Procedure (implements java.util.concurrent.https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Callable.html?is-external=true"; title="class or interface in java.util.concurrent">Callable , org.apache.hadoop.hbase.errorhandling.ForeignExceptionListener) +org.apache.hadoop.hbase.procedure2.Procedure (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true"; title="class or interface in java.lang">Comparable ) -org.apache.hadoop.hbase.procedure.TestProcedure.LatchedProcedure +org.apache.hadoop.hbase.procedure.TestProcedureDescriber.TestProcedure org.apache.hadoop.hbase.procedure.ProcedureManager http://git-wip-us.apache.org/repos/asf/hbase-site/blob/a610f23a/testdevapidocs/org/apache/hadoop/hbase/procedure2/package-tree.html -- diff --git a/testdevapidocs/org/apache/hadoop/hbase/procedure2/package-tree.html b/testdevapidocs/org/apache/hadoop/hbase/procedure2/package-tree.html index 19002f2..fbff915 100644 --- a/testdevapidocs/org/apache/hadoop/hbase/procedure2/package-tree.html +++ b/testdevapidocs/org/apache/hadoop/hbase/procedure2/package-tree.html @@ -205,9 +205,9 @@ java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true"; title="class or interface in java.lang">Enum (implements java.lang.https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true"; title="class or interface in java.lang">Comparable , java.io.https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true"; title="class or interface in java.io">Serializable) -org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State org.apache.hadoop.hbase.p
[25/35] hbase-site git commit: Published site at 8cc56bd18c40ba9a7131336e97c74f8d97d8b2be.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/713132a3/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.StoreFlusherImpl.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.StoreFlusherImpl.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.StoreFlusherImpl.html index 7becf50..5b9d987 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.StoreFlusherImpl.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HStore.StoreFlusherImpl.html @@ -332,2472 +332,2473 @@ 324 confPrintThreshold = 10; 325} 326this.parallelPutCountPrintThreshold = confPrintThreshold; -327LOG.info("Store={}, memstore type={}, storagePolicy={}, verifyBulkLoads={}, " + -328 "parallelPutCountPrintThreshold={}", getColumnFamilyName(), -329 this.memstore.getClass().getSimpleName(), policyName, -330this.verifyBulkLoads, this.parallelPutCountPrintThreshold); -331 } -332 -333 /** -334 * @return MemStore Instance to use in this store. -335 */ -336 private MemStore getMemstore() { -337MemStore ms = null; -338// Check if in-memory-compaction configured. Note MemoryCompactionPolicy is an enum! -339MemoryCompactionPolicy inMemoryCompaction = null; -340if (this.getTableName().isSystemTable()) { -341 inMemoryCompaction = MemoryCompactionPolicy.valueOf( -342 conf.get("hbase.systemtables.compacting.memstore.type", "NONE")); -343} else { -344 inMemoryCompaction = family.getInMemoryCompaction(); -345} -346if (inMemoryCompaction == null) { -347 inMemoryCompaction = -348 MemoryCompactionPolicy.valueOf(conf.get(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY, -349 CompactingMemStore.COMPACTING_MEMSTORE_TYPE_DEFAULT).toUpperCase()); -350} -351switch (inMemoryCompaction) { -352 case NONE: -353ms = ReflectionUtils.newInstance(DefaultMemStore.class, -354new Object[] { conf, this.comparator, -355 this.getHRegion().getRegionServicesForStores()}); -356break; -357 default: -358Class extends CompactingMemStore> clz = conf.getClass(MEMSTORE_CLASS_NAME, -359CompactingMemStore.class, CompactingMemStore.class); -360ms = ReflectionUtils.newInstance(clz, new Object[]{conf, this.comparator, this, -361 this.getHRegion().getRegionServicesForStores(), inMemoryCompaction}); -362} -363return ms; -364 } -365 -366 /** -367 * Creates the cache config. -368 * @param family The current column family. -369 */ -370 protected void createCacheConf(final ColumnFamilyDescriptor family) { -371this.cacheConf = new CacheConfig(conf, family); -372 } -373 -374 /** -375 * Creates the store engine configured for the given Store. -376 * @param store The store. An unfortunate dependency needed due to it -377 * being passed to coprocessors via the compactor. -378 * @param conf Store configuration. -379 * @param kvComparator KVComparator for storeFileManager. -380 * @return StoreEngine to use. -381 */ -382 protected StoreEngine, ?, ?, ?> createStoreEngine(HStore store, Configuration conf, -383 CellComparator kvComparator) throws IOException { -384return StoreEngine.create(store, conf, comparator); -385 } -386 -387 /** -388 * @param family -389 * @return TTL in seconds of the specified family -390 */ -391 public static long determineTTLFromFamily(final ColumnFamilyDescriptor family) { -392// HCD.getTimeToLive returns ttl in seconds. Convert to milliseconds. -393long ttl = family.getTimeToLive(); -394if (ttl == HConstants.FOREVER) { -395 // Default is unlimited ttl. -396 ttl = Long.MAX_VALUE; -397} else if (ttl == -1) { -398 ttl = Long.MAX_VALUE; -399} else { -400 // Second -> ms adjust for user data -401 ttl *= 1000; -402} -403return ttl; -404 } -405 -406 @Override -407 public String getColumnFamilyName() { -408return this.family.getNameAsString(); -409 } -410 -411 @Override -412 public TableName getTableName() { -413return this.getRegionInfo().getTable(); -414 } -415 -416 @Override -417 public FileSystem getFileSystem() { -418return this.fs.getFileSystem(); -419 } -420 -421 public HRegionFileSystem getRegionFileSystem() { -422return this.fs; -423 } -424 -425 /* Implementation of StoreConfigInformation */ -426 @Override -427 public long getStoreFileTtl() { -428// TTL only applies if there's no MIN_VERSIONs setting on the column. -429return (this.scanInfo.getMinVersions() == 0) ? this.scanInfo.getTtl() : Long.MAX_VALUE; -430 } -431 -432 @Override -433 public long getMemStoreFlushSize() { -434// TODO: Why is this in here? The flushsize of the region rather than the store? St.Ack -43
[25/35] hbase-site git commit: Published site at 9250bf809155ebe93fd6ae8a0485b22c744fdf70.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f17356a7/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.BulkHFileVisitor.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.BulkHFileVisitor.html b/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.BulkHFileVisitor.html index 6d25806..55fa666 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.BulkHFileVisitor.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.BulkHFileVisitor.html @@ -370,12 +370,12 @@ 362 * @param regionLocator region locator 363 * @param silence true to ignore unmatched column families 364 * @param copyFile always copy hfiles if true -365 * @return List of filenames which were not found +365 * @return Map of LoadQueueItem to region 366 * @throws TableNotFoundException if table does not yet exist 367 */ -368 public ListdoBulkLoad(Map > map, final Admin admin, Table table, -369 RegionLocator regionLocator, boolean silence, boolean copyFile) -370 throws TableNotFoundException, IOException { +368 public Map doBulkLoad(Map > map, final Admin admin, +369 Table table, RegionLocator regionLocator, boolean silence, boolean copyFile) +370 throws TableNotFoundException, IOException { 371if (!admin.isTableAvailable(regionLocator.getName())) { 372 throw new TableNotFoundException("Table " + table.getName() + " is not currently available."); 373} @@ -457,8 +457,8 @@ 449} 450 } 451 -452 List performBulkLoad(final Admin admin, Table table, RegionLocator regionLocator, -453 Deque queue, ExecutorService pool, +452 Map performBulkLoad(final Admin admin, Table table, +453 RegionLocator regionLocator, Deque queue, ExecutorService pool, 454 SecureBulkLoadClient secureClient, boolean copyFile) throws IOException { 455int count = 0; 456 @@ -472,802 +472,815 @@ 464// fs is the source filesystem 465 fsDelegationToken.acquireDelegationToken(fs); 466bulkToken = secureClient.prepareBulkLoad(admin.getConnection()); -467Pair , List > pair = null; +467Pair , Set > pair = null; 468 -469// Assumes that region splits can happen while this occurs. -470while (!queue.isEmpty()) { -471 // need to reload split keys each iteration. -472 final Pair startEndKeys = regionLocator.getStartEndKeys(); -473 if (count != 0) { -474LOG.info("Split occured while grouping HFiles, retry attempt " + -475+ count + " with " + queue.size() + " files remaining to group or split"); -476 } -477 -478 int maxRetries = getConf().getInt(HConstants.BULKLOAD_MAX_RETRIES_NUMBER, 10); -479 maxRetries = Math.max(maxRetries, startEndKeys.getFirst().length + 1); -480 if (maxRetries != 0 && count >= maxRetries) { -481throw new IOException("Retry attempted " + count + -482" times without completing, bailing out"); -483 } -484 count++; -485 -486 // Using ByteBuffer for byte[] equality semantics -487 pair = groupOrSplitPhase(table, pool, queue, startEndKeys); -488 Multimap regionGroups = pair.getFirst(); -489 -490 if (!checkHFilesCountPerRegionPerFamily(regionGroups)) { -491// Error is logged inside checkHFilesCountPerRegionPerFamily. -492throw new IOException("Trying to load more than " + maxFilesPerRegionPerFamily -493+ " hfiles to one family of one region"); -494 } -495 -496 bulkLoadPhase(table, admin.getConnection(), pool, queue, regionGroups, copyFile); -497 -498 // NOTE: The next iteration's split / group could happen in parallel to -499 // atomic bulkloads assuming that there are splits and no merges, and -500 // that we can atomically pull out the groups we want to retry. -501} -502 -503if (!queue.isEmpty()) { -504 throw new RuntimeException("Bulk load aborted with some files not yet loaded." -505+ "Please check log for more details."); -506} -507if (pair == null) return null; -508return pair.getSecond(); -509 } -510 -511 /** -512 * Prepare a collection of {@link LoadQueueItem} from list of source hfiles contained in the -513 * passed directory and validates whether the prepared queue has all the valid table column -514 * families in it. -515 * @param hfilesDir directory containing list of hfiles to be loaded into the table -516 * @param table table to which hfiles should be loaded -517 * @param queue queue w