Package com.salesforce.phoenix.cache

Examples of com.salesforce.phoenix.cache.IndexMetaDataCache


    @Override
    public Closeable newCache (ImmutableBytesWritable cachePtr, final MemoryChunk chunk) throws SQLException {
        // just use the standard keyvalue builder - this doesn't really need to be fast
        final List<IndexMaintainer> maintainers =
                IndexMaintainer.deserialize(cachePtr, GenericKeyValueBuilder.INSTANCE);
        return new IndexMetaDataCache() {

            @Override
            public void close() throws IOException {
                chunk.close();
            }
View Full Code Here


        } else {
            byte[] tenantIdBytes = attributes.get(PhoenixRuntime.TENANT_ID_ATTRIB);
            ImmutableBytesWritable tenantId =
                tenantIdBytes == null ? null : new ImmutableBytesWritable(tenantIdBytes);
            TenantCache cache = GlobalCache.getTenantCache(env, tenantId);
            IndexMetaDataCache indexCache =
                (IndexMetaDataCache) cache.getServerCache(new ImmutableBytesPtr(uuid));
            if (indexCache == null) {
                String msg = "key="+ServerCacheClient.idToString(uuid) + " region=" + env.getRegion();
                SQLException e = new SQLExceptionInfo.Builder(SQLExceptionCode.INDEX_METADATA_NOT_FOUND)
                    .setMessage(msg).build().buildException();
                ServerUtil.throwIOException("Index update failed", e); // will not return
            }
            indexMaintainers = indexCache.getIndexMaintainers();
        }
   
        return indexMaintainers;
    }
View Full Code Here

TOP

Related Classes of com.salesforce.phoenix.cache.IndexMetaDataCache

Copyright © 2018 www.massapicom. 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.