Examples of mutateRowsWithLocks()


Examples of org.apache.hadoop.hbase.regionserver.HRegion.mutateRowsWithLocks()

                // table. Basically, we get all the locks that we don't already hold for all the
                // tableMetadata rows. This ensures we don't have deadlock situations (ensuring primary and
                // then index table locks are held, in that order). For now, we just don't support indexing
                // on the system table. This is an issue because of the way we manage batch mutation in the
                // Indexer.
                region.mutateRowsWithLocks(tableMetadata, Collections.<byte[]>emptySet());
               
                // Invalidate the cache - the next getTable call will add it
                // TODO: consider loading the table that was just created here, patching up the parent table, and updating the cache
                Map<ImmutableBytesPtr,PTable> metaDataCache = GlobalCache.getInstance(this.getEnvironment()).getMetaDataCache();
                if (parentCacheKey != null) {
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.mutateRowsWithLocks()

                if (result.getMutationCode() != MutationCode.TABLE_ALREADY_EXISTS || result.getTable() == null) {
                    return result;
                }
                Map<ImmutableBytesPtr,PTable> metaDataCache = GlobalCache.getInstance(this.getEnvironment()).getMetaDataCache();
                // Commit the list of deletion.
                region.mutateRowsWithLocks(tableMetadata, Collections.<byte[]>emptySet());
                long currentTime = MetaDataUtil.getClientTimeStamp(tableMetadata);
                for (ImmutableBytesPtr ckey: invalidateList) {
                    metaDataCache.put(ckey, newDeletedTableMarker(currentTime));
                }
                if (parentTableName != null) {
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.mutateRowsWithLocks()

                result = mutator.updateMutation(table, rowKeyMetaData, tableMetadata, region, invalidateList, lids);
                if (result != null) {
                    return result;
                }
               
                region.mutateRowsWithLocks(tableMetadata, Collections.<byte[]>emptySet());
                // Invalidate from cache
                for (ImmutableBytesPtr invalidateKey : invalidateList) {
                    PTable invalidatedTable = metaDataCache.remove(invalidateKey);
                    if (logger.isDebugEnabled()) {
                        if (invalidatedTable == null) {
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.mutateRowsWithLocks()

                } else if (currentState == PIndexState.INACTIVE && newState == PIndexState.USABLE) {
                    newState = PIndexState.ACTIVE;
                    newKVs.set(0, KeyValueUtil.newKeyValue(key, TABLE_FAMILY_BYTES, INDEX_STATE_BYTES, timeStamp, Bytes.toBytes(newState.getSerializedValue())));
                }
                if (currentState != newState) {
                    region.mutateRowsWithLocks(tableMetadata, Collections.<byte[]>emptySet());
                    // Invalidate from cache
                    Map<ImmutableBytesPtr,PTable> metaDataCache = GlobalCache.getInstance(this.getEnvironment()).getMetaDataCache();
                    metaDataCache.remove(cacheKey);
                }
                // Get client timeStamp from mutations, since it may get updated by the mutateRowsWithLocks call
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.