phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas D'Silva (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1676) Set priority of Index Updates correctly
Date Fri, 27 Feb 2015 21:37:04 GMT


Thomas D'Silva commented on PHOENIX-1676:

I also tried creating a simple htable, but IndexQosRpcController.setPriority is not getting
called for this table.  

    public void testTableWriteWithQos() throws Exception {
        final TableName tableName = TableName.valueOf("TEST");
        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
        Connection conn = driver.connect(url, props);
        PhoenixConnection phoenixConn = conn.unwrap(PhoenixConnection.class);
        HBaseAdmin admin = phoenixConn.getQueryServices().getAdmin();
        byte[][] SPLITS = new byte[][] {Bytes.toBytes(20), Bytes.toBytes(30)};
        try {
            // Create table then get the single region for our new table.
            HTableDescriptor descriptor = new HTableDescriptor(tableName);
            HColumnDescriptor columnDescriptor =  new HColumnDescriptor(Bytes.toBytes("cf"));
            admin.createTable(descriptor, SPLITS);
            HTableInterface t = phoenixConn.getQueryServices().getTable(Bytes.toBytes("TEST"));
            byte[] k1 = Bytes.toBytes(15);
            Put p = new Put(k1);
            p.add(Bytes.toBytes("cf"), Bytes.toBytes("q1"), Bytes.toBytes("value1"));
            byte[] k2 = Bytes.toBytes(25);
            p = new Put(k2);
            p.add(Bytes.toBytes("cf"), Bytes.toBytes("q2"), Bytes.toBytes("value2"));
            byte[] k3 = Bytes.toBytes(35);
            p = new Put(k3);
            p.add(Bytes.toBytes("cf"), Bytes.toBytes("q3"), Bytes.toBytes("value3"));
            Result r = t.get(new Get(k1));
            r = t.get(new Get(k2));
            r = t.get(new Get(k3));
        } finally {

> Set priority of Index Updates correctly 
> ----------------------------------------
>                 Key: PHOENIX-1676
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Thomas D'Silva
>            Assignee: Thomas D'Silva
> I spoke to Jesse offline about this. 
> The priority of index updates isn't being set correctly because of the use of CoprocessorHConnection
(which all coprocessors use if they create an HTable via the CPEnvironment).
> Specifically the flow happens like this: the CoprocessorHTableFactory attempts to set
the connection qos factory, but it is ignored because the CoprocessorHConnection is used (instead
of a standard HConnection) and the #getClient method just goes straight into the rpc scheduler
of the HRegionServer, if its on the same server. This allows the region to be directly accessed,
but without actually going over the loopback or serializing any information.
> However, this means it ignores the configured rpccontroller factory and the override
setting of the rpc priority. We probably shouldn't be runtime changing the configuration -
instead we should probably be using some other serialized information.
> The primary fix would seems to be that the regionserver needs to be configured with the
IndexQosRpcControllerFactory and then use a static map (or cache of the index metadata) to
set the qos for the index servers. 

This message was sent by Atlassian JIRA

View raw message