Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorProxy()


               
                // Disable the index by using the updateIndexState method of MetaDataProtocol end point coprocessor.
                indexTableName = ref.getTableName();
                byte[] indexTableKey = SchemaUtil.getTableKeyFromFullName(indexTableName);
                HTableInterface systemTable = env.getTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES);
                MetaDataProtocol mdProxy = systemTable.coprocessorProxy(MetaDataProtocol.class, indexTableKey);
                // Mimic the Put that gets generated by the client on an update of the index state
                Put put = new Put(indexTableKey);
                put.add(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.INDEX_STATE_BYTES,
                    PIndexState.DISABLE.getSerializedBytes());
                put.add(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.INDEX_DISABLE_TIMESTAMP_BYTES,
View Full Code Here


                    closeables.add(htable);
                    futures.add(executor.submit(new JobCallable<Boolean>() {
                       
                        @Override
                        public Boolean call() throws Exception {
                            ServerCachingProtocol protocol = htable.coprocessorProxy(ServerCachingProtocol.class, key);
                            return protocol.addServerCache(connection.getTenantId() == null ? null : connection.getTenantId().getBytes(), cacheId, cachePtr, cacheFactory);
                        }

                        /**
                         * Defines the grouping for round robin behavior.  All threads spawned to process
View Full Code Here

        if (LOG.isDebugEnabled()) {LOG.debug("Removing Cache " + cacheId + " from servers.");}
        for (HRegionLocation entry : locations) {
          if (remainingOnServers.contains(entry)) {  // Call once per server
            try {
              byte[] key = entry.getRegionInfo().getStartKey();
              ServerCachingProtocol protocol = iterateOverTable.coprocessorProxy(ServerCachingProtocol.class, key);
              protocol.removeServerCache(connection.getTenantId() == null ? null : connection.getTenantId().getBytes(), cacheId);
              remainingOnServers.remove(entry);
            } catch (Throwable t) {
              lastThrowable = t;
              LOG.error("Error trying to remove hash cache for " + entry, t);
View Full Code Here

            for (HTableInterfaceReference ref : refs) {
                // Disable the index by using the updateIndexState method of MetaDataProtocol end point coprocessor.
                String indexTableName = ref.getTableName();
                byte[] indexTableKey = SchemaUtil.getTableKeyFromFullName(indexTableName);
                HTableInterface systemTable = env.getTable(PhoenixDatabaseMetaData.TYPE_TABLE_NAME_BYTES);
                MetaDataProtocol mdProxy = systemTable.coprocessorProxy(MetaDataProtocol.class, indexTableKey);
                // Mimic the Put that gets generated by the client on an update of the index state
                Put put = new Put(indexTableKey);
                put.add(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.INDEX_STATE_BYTES, PIndexState.DISABLE.getSerializedBytes());
                List<Mutation> tableMetadata = Collections.<Mutation>singletonList(put);
                MetaDataMutationResult result = mdProxy.updateIndexState(tableMetadata);
View Full Code Here

                    closeables.add(htable);
                    futures.add(executor.submit(new JobCallable<Boolean>() {
                       
                        @Override
                        public Boolean call() throws Exception {
                            ServerCachingProtocol protocol = htable.coprocessorProxy(ServerCachingProtocol.class, key);
                            return protocol.addServerCache(connection.getTenantId(), cacheId, cachePtr, cacheFactory);
                        }

                        /**
                         * Defines the grouping for round robin behavior.  All threads spawned to process
View Full Code Here

         */
        for (HRegionLocation entry : locations) {
            if (remainingOnServers.contains(entry)) {  // Call once per server
                try {
                    byte[] key = entry.getRegionInfo().getStartKey();
                    ServerCachingProtocol protocol = iterateOverTable.coprocessorProxy(ServerCachingProtocol.class, key);
                    protocol.removeServerCache(connection.getTenantId(), cacheId);
                    remainingOnServers.remove(entry);
                } catch (Throwable t) {
                    lastThrowable = t;
                    LOG.error("Error trying to remove hash cache for " + entry, t);
View Full Code Here

            for (HTableInterfaceReference ref : refs) {
                // Disable the index by using the updateIndexState method of MetaDataProtocol end point coprocessor.
                String indexTableName = ref.getTableName();
                byte[] indexTableKey = SchemaUtil.getTableKeyFromFullName(indexTableName);
                HTableInterface systemTable = env.getTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES);
                MetaDataProtocol mdProxy = systemTable.coprocessorProxy(MetaDataProtocol.class, indexTableKey);
                // Mimic the Put that gets generated by the client on an update of the index state
                Put put = new Put(indexTableKey);
                put.add(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.INDEX_STATE_BYTES, PIndexState.DISABLE.getSerializedBytes());
                List<Mutation> tableMetadata = Collections.<Mutation>singletonList(put);
                MetaDataMutationResult result = mdProxy.updateIndexState(tableMetadata);
View Full Code Here

                    closeables.add(htable);
                    futures.add(executor.submit(new JobCallable<Boolean>() {
                       
                        @Override
                        public Boolean call() throws Exception {
                            ServerCachingProtocol protocol = htable.coprocessorProxy(ServerCachingProtocol.class, key);
                            return protocol.addServerCache(connection.getTenantId() == null ? null : connection.getTenantId().getBytes(), cacheId, cachePtr, cacheFactory);
                        }

                        /**
                         * Defines the grouping for round robin behavior.  All threads spawned to process
View Full Code Here

        if (LOG.isDebugEnabled()) {LOG.debug("Removing Cache " + cacheId + " from servers.");}
        for (HRegionLocation entry : locations) {
            if (remainingOnServers.contains(entry)) {  // Call once per server
                try {
                    byte[] key = entry.getRegionInfo().getStartKey();
                    ServerCachingProtocol protocol = iterateOverTable.coprocessorProxy(ServerCachingProtocol.class, key);
                    protocol.removeServerCache(connection.getTenantId() == null ? null : connection.getTenantId().getBytes(), cacheId);
                    remainingOnServers.remove(entry);
                } catch (Throwable t) {
                    lastThrowable = t;
                    LOG.error("Error trying to remove hash cache for " + entry, t);
View Full Code Here

            for (HTableInterfaceReference ref : refs) {
                // Disable the index by using the updateIndexState method of MetaDataProtocol end point coprocessor.
                String indexTableName = ref.getTableName();
                byte[] indexTableKey = SchemaUtil.getTableKeyFromFullName(indexTableName);
                HTableInterface systemTable = env.getTable(PhoenixDatabaseMetaData.TYPE_TABLE_NAME_BYTES);
                MetaDataProtocol mdProxy = systemTable.coprocessorProxy(MetaDataProtocol.class, indexTableKey);
                // Mimic the Put that gets generated by the client on an update of the index state
                Put put = new Put(indexTableKey);
                put.add(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.INDEX_STATE_BYTES, PIndexState.DISABLE.getSerializedBytes());
                List<Mutation> tableMetadata = Collections.<Mutation>singletonList(put);
                MetaDataMutationResult result = mdProxy.updateIndexState(tableMetadata);
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.