Search in sources :

Example 1 with CConfigurationCacheSupplier

use of co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier in project cdap by caskdata.

the class DefaultTransactionProcessor method start.

@Override
public void start(CoprocessorEnvironment e) throws IOException {
    if (e instanceof RegionCoprocessorEnvironment) {
        RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment) e;
        HTableDescriptor tableDesc = env.getRegion().getTableDesc();
        String hbaseNamespacePrefix = tableDesc.getValue(Constants.Dataset.TABLE_PREFIX);
        this.sysConfigTablePrefix = HTableNameConverter.getSysConfigTablePrefix(hbaseNamespacePrefix);
        this.cConfCacheSupplier = new CConfigurationCacheSupplier(env.getConfiguration(), sysConfigTablePrefix, TxConstants.Manager.CFG_TX_MAX_LIFETIME, TxConstants.Manager.DEFAULT_TX_MAX_LIFETIME);
        this.cConfCache = cConfCacheSupplier.get();
    }
    // Need to create the cConf cache before calling start on the parent, since it is required for
    // initializing some properties in the parent class.
    super.start(e);
}
Also used : RegionCoprocessorEnvironment(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment) CConfigurationCacheSupplier(co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier) HTableDescriptor(org.apache.hadoop.hbase.HTableDescriptor)

Example 2 with CConfigurationCacheSupplier

use of co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier in project cdap by caskdata.

the class DefaultTransactionProcessor method start.

@Override
public void start(CoprocessorEnvironment e) throws IOException {
    if (e instanceof RegionCoprocessorEnvironment) {
        RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment) e;
        HTableDescriptor tableDesc = env.getRegion().getTableDesc();
        String hbaseNamespacePrefix = tableDesc.getValue(Constants.Dataset.TABLE_PREFIX);
        this.sysConfigTablePrefix = HTableNameConverter.getSysConfigTablePrefix(hbaseNamespacePrefix);
        this.cConfCacheSupplier = new CConfigurationCacheSupplier(env.getConfiguration(), sysConfigTablePrefix, TxConstants.Manager.CFG_TX_MAX_LIFETIME, TxConstants.Manager.DEFAULT_TX_MAX_LIFETIME);
        this.cConfCache = cConfCacheSupplier.get();
    }
    // Need to create the cConf cache before calling start on the parent, since it is required for
    // initializing some properties in the parent class.
    super.start(e);
}
Also used : RegionCoprocessorEnvironment(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment) CConfigurationCacheSupplier(co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier) HTableDescriptor(org.apache.hadoop.hbase.HTableDescriptor)

Example 3 with CConfigurationCacheSupplier

use of co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier in project cdap by caskdata.

the class DefaultTransactionProcessor method start.

@Override
public void start(CoprocessorEnvironment e) throws IOException {
    if (e instanceof RegionCoprocessorEnvironment) {
        RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment) e;
        HTableDescriptor tableDesc = env.getRegion().getTableDesc();
        String hbaseNamespacePrefix = tableDesc.getValue(Constants.Dataset.TABLE_PREFIX);
        this.sysConfigTablePrefix = HTableNameConverter.getSysConfigTablePrefix(hbaseNamespacePrefix);
        this.cConfCacheSupplier = new CConfigurationCacheSupplier(env.getConfiguration(), sysConfigTablePrefix, TxConstants.Manager.CFG_TX_MAX_LIFETIME, TxConstants.Manager.DEFAULT_TX_MAX_LIFETIME);
        this.cConfCache = cConfCacheSupplier.get();
    }
    // Need to create the cConf cache before calling start on the parent, since it is required for
    // initializing some properties in the parent class.
    super.start(e);
}
Also used : RegionCoprocessorEnvironment(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment) CConfigurationCacheSupplier(co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier) HTableDescriptor(org.apache.hadoop.hbase.HTableDescriptor)

Example 4 with CConfigurationCacheSupplier

use of co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier in project cdap by caskdata.

the class DefaultTransactionProcessor method start.

@Override
public void start(CoprocessorEnvironment e) throws IOException {
    if (e instanceof RegionCoprocessorEnvironment) {
        RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment) e;
        HTableDescriptor tableDesc = env.getRegion().getTableDesc();
        String hbaseNamespacePrefix = tableDesc.getValue(Constants.Dataset.TABLE_PREFIX);
        this.sysConfigTablePrefix = HTableNameConverter.getSysConfigTablePrefix(hbaseNamespacePrefix);
        this.cConfCacheSupplier = new CConfigurationCacheSupplier(env.getConfiguration(), sysConfigTablePrefix, TxConstants.Manager.CFG_TX_MAX_LIFETIME, TxConstants.Manager.DEFAULT_TX_MAX_LIFETIME);
        this.cConfCache = cConfCacheSupplier.get();
    }
    // Need to create the cConf cache before calling start on the parent, since it is required for
    // initializing some properties in the parent class.
    super.start(e);
}
Also used : RegionCoprocessorEnvironment(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment) CConfigurationCacheSupplier(co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier) HTableDescriptor(org.apache.hadoop.hbase.HTableDescriptor)

Example 5 with CConfigurationCacheSupplier

use of co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier in project cdap by caskdata.

the class DefaultTransactionProcessor method start.

@Override
public void start(CoprocessorEnvironment e) throws IOException {
    if (e instanceof RegionCoprocessorEnvironment) {
        RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment) e;
        HTableDescriptor tableDesc = env.getRegion().getTableDesc();
        String hbaseNamespacePrefix = tableDesc.getValue(Constants.Dataset.TABLE_PREFIX);
        this.sysConfigTablePrefix = HTableNameConverter.getSysConfigTablePrefix(hbaseNamespacePrefix);
        this.cConfCacheSupplier = new CConfigurationCacheSupplier(env.getConfiguration(), sysConfigTablePrefix, TxConstants.Manager.CFG_TX_MAX_LIFETIME, TxConstants.Manager.DEFAULT_TX_MAX_LIFETIME);
        this.cConfCache = cConfCacheSupplier.get();
    }
    // Need to create the cConf cache before calling start on the parent, since it is required for
    // initializing some properties in the parent class.
    super.start(e);
}
Also used : RegionCoprocessorEnvironment(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment) CConfigurationCacheSupplier(co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier) HTableDescriptor(org.apache.hadoop.hbase.HTableDescriptor)

Aggregations

CConfigurationCacheSupplier (co.cask.cdap.data2.transaction.coprocessor.CConfigurationCacheSupplier)8 HTableDescriptor (org.apache.hadoop.hbase.HTableDescriptor)7 RegionCoprocessorEnvironment (org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment)7 CacheSupplier (co.cask.cdap.data2.transaction.coprocessor.CacheSupplier)1 TopicMetadataCacheSupplier (co.cask.cdap.messaging.TopicMetadataCacheSupplier)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1