use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class ReadOnlyPropertiesTest method testOverrideProperties.
@Test
public void testOverrideProperties() {
ReadOnlyProps defaultProps = new ReadOnlyProps(DEFAULT_PROPS_MAP);
ReadOnlyProps readOnlyProps = new ReadOnlyProps(defaultProps, OVERRIDE_MAP.entrySet().iterator());
assertEquals(OVERRIDEN_VALUE_1, readOnlyProps.get(PROPERTY_NAME_1));
assertEquals(DEFAULT_VALUE_2, readOnlyProps.get(PROPERTY_NAME_2));
}
use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class BaseClientManagedTimeIT method doSetup.
@BeforeClass
public static void doSetup() throws Exception {
Map<String, String> props = getDefaultProps();
setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
}
use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class TxWriteFailureIT method doSetup.
@BeforeClass
public static void doSetup() throws Exception {
Map<String, String> serverProps = Maps.newHashMapWithExpectedSize(3);
serverProps.put("hbase.coprocessor.region.classes", FailingRegionObserver.class.getName());
serverProps.put("hbase.coprocessor.abortonerror", "false");
serverProps.put(Indexer.CHECK_VERSION_CONF_KEY, "false");
Map<String, String> clientProps = Maps.newHashMapWithExpectedSize(10);
clientProps.put(QueryServices.DEFAULT_TABLE_ISTRANSACTIONAL_ATTRIB, "true");
clientProps.put(QueryServices.TRANSACTIONS_ENABLED, "true");
setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), new ReadOnlyProps(clientProps.entrySet().iterator()));
}
use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class RoundRobinResultIteratorWithStatsIT method doSetup.
@BeforeClass
public static void doSetup() throws Exception {
Map<String, String> props = Maps.newHashMapWithExpectedSize(3);
// Must update config before starting server
props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, Long.toString(70000));
props.put(QueryServices.QUEUE_SIZE_ATTRIB, Integer.toString(10000));
props.put(QueryServices.EXPLAIN_CHUNK_COUNT_ATTRIB, Boolean.TRUE.toString());
/*
* Don't force row key order. This causes RoundRobinResultIterator to be used if there was no order by specified
* on the query.
*/
props.put(QueryServices.FORCE_ROW_KEY_ORDER_ATTRIB, Boolean.toString(false));
setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
}
use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class PhoenixMetricsIT method doSetup.
@BeforeClass
public static void doSetup() throws Exception {
Map<String, String> props = Maps.newHashMapWithExpectedSize(1);
// Enable request metric collection at the driver level
props.put(QueryServices.COLLECT_REQUEST_LEVEL_METRICS, String.valueOf(true));
// disable renewing leases as this will force spooling to happen.
props.put(QueryServices.RENEW_LEASE_ENABLED, String.valueOf(false));
setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
// need the non-test driver for some tests that check number of hconnections, etc.
DriverManager.registerDriver(PhoenixDriver.INSTANCE);
}
Aggregations