@Override public RpcScheduler create(Configuration configuration, PriorityFunction priorityFunction) { return create(configuration, priorityFunction, null); }
@Override public RpcScheduler create(Configuration conf, PriorityFunction priorityFunction, Abortable abortable) { // create the delegate scheduler RpcScheduler delegate; try { // happens in <=0.98.4 where the scheduler factory is not visible delegate = new SimpleRpcSchedulerFactory().create(conf, priorityFunction, abortable); } catch (IllegalAccessError e) { LOG.fatal(VERSION_TOO_OLD_FOR_INDEX_RPC); throw e; } // get the index priority configs int indexPriority = getIndexPriority(conf); validatePriority(indexPriority); // get the metadata priority configs int metadataPriority = getMetadataPriority(conf); validatePriority(metadataPriority); // validate index and metadata priorities are not the same Preconditions.checkArgument(indexPriority != metadataPriority, "Index and Metadata priority must not be same "+ indexPriority); LOG.info("Using custom Phoenix Index RPC Handling with index rpc priority " + indexPriority + " and metadata rpc priority " + metadataPriority); PhoenixRpcScheduler scheduler = new PhoenixRpcScheduler(conf, delegate, indexPriority, metadataPriority, priorityFunction,abortable); return scheduler; }
String.valueOf(PhoenixRpcSchedulerFactory.getMetadataPriority(config))); } else if (tableType == PTableType.INDEX // Global, mutable index && !isLocalIndexTable(tableDescriptorBuilder.build().getColumnFamilyNames()) && !Boolean.TRUE.equals(tableProps.get(PhoenixDatabaseMetaData.IMMUTABLE_ROWS))) { tableDescriptorBuilder.setValue(QueryConstants.PRIORITY, String.valueOf(PhoenixRpcSchedulerFactory.getIndexPriority(config)));
PhoenixRpcSchedulerFactory factory = new PhoenixRpcSchedulerFactory(); factory.create(conf, null); factory.create(conf, null); factory.create(conf, null); factory.create(conf, null); fail("Should not have allowed priorities in HBase range"); } catch (IllegalArgumentException e) { factory.create(conf, null); fail("Should not have allowed priorities in HBase range"); } catch (IllegalArgumentException e) { factory.create(conf, null); fail("Should not have allowed priorities in HBase range"); } catch (IllegalArgumentException e) { factory.create(conf, null); fail("Should not have allowed priorities in HBase range"); } catch (IllegalArgumentException e) { factory.create(conf, null); fail("Should not have allowed priorities in HBase range"); } catch (IllegalArgumentException e) { factory.create(conf, null); fail("Should not have allowed priorities in HBase range");
public IndexRpcController(HBaseRpcController delegate, Configuration conf) { super(delegate); this.priority = PhoenixRpcSchedulerFactory.getIndexPriority(conf); this.tracingTableName = conf.get(QueryServices.TRACING_STATS_TABLE_NAME_ATTRIB, QueryServicesOptions.DEFAULT_TRACING_STATS_TABLE_NAME); }
public MetadataRpcController(HBaseRpcController delegate, Configuration conf) { super(delegate); this.priority = PhoenixRpcSchedulerFactory.getMetadataPriority(conf); }
assertNotNull("PRIORITY is not set for table:" + htd, val); assertTrue(Integer.parseInt(val) >= PhoenixRpcSchedulerFactory.getMetadataPriority(config)); val = indexTable.getValue("PRIORITY"); assertNotNull("PRIORITY is not set for table:" + indexTable, val); assertTrue(Integer.parseInt(val) >= PhoenixRpcSchedulerFactory.getIndexPriority(config));
public IndexRpcController(HBaseRpcController delegate, Configuration conf) { super(delegate); this.priority = PhoenixRpcSchedulerFactory.getIndexPriority(conf); this.tracingTableName = conf.get(QueryServices.TRACING_STATS_TABLE_NAME_ATTRIB, QueryServicesOptions.DEFAULT_TRACING_STATS_TABLE_NAME); }
public MetadataRpcController(HBaseRpcController delegate, Configuration conf) { super(delegate); this.priority = PhoenixRpcSchedulerFactory.getMetadataPriority(conf); }
@Override public RpcScheduler create(Configuration conf, PriorityFunction priorityFunction, Abortable abortable) { // create the delegate scheduler RpcScheduler delegate; try { // happens in <=0.98.4 where the scheduler factory is not visible delegate = new SimpleRpcSchedulerFactory().create(conf, priorityFunction, abortable); } catch (IllegalAccessError e) { LOG.fatal(VERSION_TOO_OLD_FOR_INDEX_RPC); throw e; } // get the index priority configs int indexPriority = getIndexPriority(conf); validatePriority(indexPriority); // get the metadata priority configs int metadataPriority = getMetadataPriority(conf); validatePriority(metadataPriority); // validate index and metadata priorities are not the same Preconditions.checkArgument(indexPriority != metadataPriority, "Index and Metadata priority must not be same "+ indexPriority); LOG.info("Using custom Phoenix Index RPC Handling with index rpc priority " + indexPriority + " and metadata rpc priority " + metadataPriority); PhoenixRpcScheduler scheduler = new PhoenixRpcScheduler(conf, delegate, indexPriority, metadataPriority, priorityFunction,abortable); return scheduler; }
String.valueOf(PhoenixRpcSchedulerFactory.getMetadataPriority(config))); } else if (tableType == PTableType.INDEX // Global, mutable index && !isLocalIndexTable(tableDescriptorBuilder.build().getColumnFamilyNames()) && !Boolean.TRUE.equals(tableProps.get(PhoenixDatabaseMetaData.IMMUTABLE_ROWS))) { tableDescriptorBuilder.setValue(QueryConstants.PRIORITY, String.valueOf(PhoenixRpcSchedulerFactory.getIndexPriority(config)));
@Override public RpcScheduler create(Configuration conf, PriorityFunction priorityFunction, Abortable abortable) { PhoenixRpcScheduler phoenixIndexRpcScheduler = (PhoenixRpcScheduler)super.create(conf, priorityFunction, abortable); phoenixIndexRpcScheduler.setIndexExecutorForTesting(indexRpcExecutor); phoenixIndexRpcScheduler.setMetadataExecutorForTesting(metadataRpcExecutor); return phoenixIndexRpcScheduler; }
public IndexRpcController(HBaseRpcController delegate, Configuration conf) { super(delegate); this.priority = PhoenixRpcSchedulerFactory.getIndexPriority(conf); this.tracingTableName = conf.get(QueryServices.TRACING_STATS_TABLE_NAME_ATTRIB, QueryServicesOptions.DEFAULT_TRACING_STATS_TABLE_NAME); }
public MetadataRpcController(HBaseRpcController delegate, Configuration conf) { super(delegate); this.priority = PhoenixRpcSchedulerFactory.getMetadataPriority(conf); }
@Override public RpcScheduler create(Configuration conf, PriorityFunction priorityFunction, Abortable abortable) { // create the delegate scheduler RpcScheduler delegate; try { // happens in <=0.98.4 where the scheduler factory is not visible delegate = new SimpleRpcSchedulerFactory().create(conf, priorityFunction, abortable); } catch (IllegalAccessError e) { LOG.fatal(VERSION_TOO_OLD_FOR_INDEX_RPC); throw e; } // get the index priority configs int indexPriority = getIndexPriority(conf); validatePriority(indexPriority); // get the metadata priority configs int metadataPriority = getMetadataPriority(conf); validatePriority(metadataPriority); // validate index and metadata priorities are not the same Preconditions.checkArgument(indexPriority != metadataPriority, "Index and Metadata priority must not be same "+ indexPriority); LOG.info("Using custom Phoenix Index RPC Handling with index rpc priority " + indexPriority + " and metadata rpc priority " + metadataPriority); PhoenixRpcScheduler scheduler = new PhoenixRpcScheduler(conf, delegate, indexPriority, metadataPriority, priorityFunction,abortable); return scheduler; }
String.valueOf(PhoenixRpcSchedulerFactory.getMetadataPriority(config))); } else if (tableType == PTableType.INDEX // Global, mutable index && !isLocalIndexTable(tableDescriptorBuilder.build().getColumnFamilyNames()) && !Boolean.TRUE.equals(tableProps.get(PhoenixDatabaseMetaData.IMMUTABLE_ROWS))) { tableDescriptorBuilder.setValue(QueryConstants.PRIORITY, String.valueOf(PhoenixRpcSchedulerFactory.getIndexPriority(config)));
@Override public RpcScheduler create(Configuration configuration, PriorityFunction priorityFunction) { return create(configuration, priorityFunction, null); }
@Override public RpcScheduler create(Configuration configuration, PriorityFunction priorityFunction) { return create(configuration, priorityFunction, null); }