/** * Adds a value to the memstore */ public void add(final Cell cell, MemStoreSizing memstoreSizing) { lock.readLock().lock(); try { if (this.currentParallelPutCount.getAndIncrement() > this.parallelPutCountPrintThreshold) { LOG.trace(this.getTableName() + "tableName={}, encodedName={}, columnFamilyName={} is " + "too busy!", this.getRegionInfo().getEncodedName(), this .getColumnFamilyName()); } this.memstore.add(cell, memstoreSizing); } finally { lock.readLock().unlock(); currentParallelPutCount.decrementAndGet(); } }
/** * Adds the specified value to the memstore */ public void add(final Iterable<Cell> cells, MemStoreSizing memstoreSizing) { lock.readLock().lock(); try { if (this.currentParallelPutCount.getAndIncrement() > this.parallelPutCountPrintThreshold) { LOG.trace(this.getTableName() + "tableName={}, encodedName={}, columnFamilyName={} is " + "too busy!", this.getRegionInfo().getEncodedName(), this .getColumnFamilyName()); } memstore.add(cells, memstoreSizing); } finally { lock.readLock().unlock(); currentParallelPutCount.decrementAndGet(); } }
void reportArchivedFilesForQuota(List<? extends StoreFile> archivedFiles, List<Long> fileSizes) { // Sanity check from the caller if (archivedFiles.size() != fileSizes.size()) { throw new RuntimeException("Coding error: should never see lists of varying size"); } RegionServerServices rss = this.region.getRegionServerServices(); if (rss == null) { return; } List<Entry<String,Long>> filesWithSizes = new ArrayList<>(archivedFiles.size()); Iterator<Long> fileSizeIter = fileSizes.iterator(); for (StoreFile storeFile : archivedFiles) { final long fileSize = fileSizeIter.next(); if (storeFile.isHFile() && fileSize != 0) { filesWithSizes.add(Maps.immutableEntry(storeFile.getPath().getName(), fileSize)); } } if (LOG.isTraceEnabled()) { LOG.trace("Files archived: " + archivedFiles + ", reporting the following to the Master: " + filesWithSizes); } boolean success = rss.reportFileArchivalForQuotas(getTableName(), filesWithSizes); if (!success) { LOG.warn("Failed to report archival of files: " + filesWithSizes); } }
public DefaultMobStoreFlusher(Configuration conf, HStore store) throws IOException { super(conf, store); if (!(store instanceof HMobStore)) { throw new IllegalArgumentException("The store " + store + " is not a HMobStore"); } mobCellValueSizeThreshold = store.getColumnFamilyDescriptor().getMobThreshold(); this.targetPath = MobUtils.getMobFamilyPath(conf, store.getTableName(), store.getColumnFamilyName()); if (!this.store.getFileSystem().exists(targetPath)) { this.store.getFileSystem().mkdirs(targetPath); } this.mobStore = (HMobStore) store; }
if (this.getTableName().isSystemTable()) { inMemoryCompaction = MemoryCompactionPolicy.valueOf( conf.get("hbase.systemtables.compacting.memstore.type", "NONE"));
long now = 0; boolean hasMore; Path path = MobUtils.getMobFamilyPath(conf, store.getTableName(), store.getColumnFamilyName()); byte[] fileName = null; StoreFileWriter mobFileWriter = null, delFileWriter = null;