use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class QueryTimeoutIT method testSetRPCTimeOnConnection.
@Test
public void testSetRPCTimeOnConnection() throws Exception {
Properties overriddenProps = PropertiesUtil.deepCopy(TEST_PROPERTIES);
overriddenProps.put(QueryServices.EXTRA_JDBC_ARGUMENTS_ATTRIB, QueryServicesOptions.DEFAULT_EXTRA_JDBC_ARGUMENTS);
overriddenProps.setProperty("hbase.rpc.timeout", Long.toString(100));
String url = QueryUtil.getConnectionUrl(overriddenProps, config, "longRunning");
Connection conn1 = DriverManager.getConnection(url, overriddenProps);
ConnectionQueryServices s1 = conn1.unwrap(PhoenixConnection.class).getQueryServices();
ReadOnlyProps configProps = s1.getProps();
assertEquals("100", configProps.get("hbase.rpc.timeout"));
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
props.put(QueryServices.EXTRA_JDBC_ARGUMENTS_ATTRIB, QueryServicesOptions.DEFAULT_EXTRA_JDBC_ARGUMENTS);
Connection conn2 = DriverManager.getConnection(getUrl(), props);
ConnectionQueryServices s2 = conn2.unwrap(PhoenixConnection.class).getQueryServices();
assertFalse(s1 == s2);
Connection conn3 = DriverManager.getConnection(getUrl(), props);
ConnectionQueryServices s3 = conn3.unwrap(PhoenixConnection.class).getQueryServices();
assertTrue(s2 == s3);
Connection conn4 = DriverManager.getConnection(url, overriddenProps);
ConnectionQueryServices s4 = conn4.unwrap(PhoenixConnection.class).getQueryServices();
assertTrue(s1 == s4);
}
use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class QueryWithLimitIT 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(50));
props.put(QueryServices.QUEUE_SIZE_ATTRIB, Integer.toString(1));
props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.TRUE.toString());
// Prevents RejectedExecutionException when deleting sequences
props.put(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB, Integer.toString(0));
props.put(QueryServices.THREAD_POOL_SIZE_ATTRIB, Integer.toString(4));
setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
}
use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class SequenceBulkAllocationIT method doSetup.
@BeforeClass
@Shadower(classBeingShadowed = BaseClientManagedTimeIT.class)
public static void doSetup() throws Exception {
Map<String, String> props = getDefaultProps();
// Must update config before starting server
props.put(QueryServices.SEQUENCE_CACHE_SIZE_ATTRIB, Long.toString(BATCH_SIZE));
setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
}
use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class ExplainPlanWithStatsEnabledIT method doSetup.
@BeforeClass
public static void doSetup() throws Exception {
Map<String, String> props = Maps.newHashMapWithExpectedSize(1);
props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, Long.toString(20));
setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
tableA = generateUniqueName();
initDataAndStats(tableA);
tableB = generateUniqueName();
initDataAndStats(tableB);
}
use of org.apache.phoenix.util.ReadOnlyProps in project phoenix by apache.
the class SkipScanBigFilterTest method doSetup.
@BeforeClass
@Shadower(classBeingShadowed = BaseConnectionlessQueryTest.class)
public static void doSetup() throws Exception {
Map<String, String> props = Maps.newHashMapWithExpectedSize(1);
// enables manual splitting on salted tables
props.put(QueryServices.FORCE_ROW_KEY_ORDER_ATTRIB, Boolean.toString(false));
initDriver(new ReadOnlyProps(props.entrySet().iterator()));
}
Aggregations