本文整理汇总了Java中com.taobao.tddl.optimizer.costbased.esitimater.stat.LocalStatManager类的典型用法代码示例。如果您正苦于以下问题:Java LocalStatManager类的具体用法?Java LocalStatManager怎么用?Java LocalStatManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LocalStatManager类属于com.taobao.tddl.optimizer.costbased.esitimater.stat包,在下文中一共展示了LocalStatManager类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: optimizerInit
import com.taobao.tddl.optimizer.costbased.esitimater.stat.LocalStatManager; //导入依赖的package包/类
public void optimizerInit() throws TddlException {
CostBasedOptimizer optimizer = new CostBasedOptimizer(optimizerRule);
optimizer.setExpireTime(GeneralUtil.getExtraCmdLong(this.connectionProperties,
ConnectionProperties.OPTIMIZER_CACHE_EXPIRE_TIME,
TddlConstants.DEFAULT_OPTIMIZER_EXPIRE_TIME));
optimizer.setCacheSize(GeneralUtil.getExtraCmdLong(this.connectionProperties,
ConnectionProperties.OPTIMIZER_CACHE_SIZE,
TddlConstants.DEFAULT_OPTIMIZER_CACHE_SIZE));
optimizer.init();
this.optimizer = optimizer;
this.sqlParseManager = optimizer.getSqlParseManager();
// RuleStatManager statManager = new RuleStatManager(optimizerRule,
// topologyHandler.getMatrix());
LocalStatManager statManager = new LocalStatManager();
statManager.init();
this.statManager = statManager;
}
示例2: optimizerInit
import com.taobao.tddl.optimizer.costbased.esitimater.stat.LocalStatManager; //导入依赖的package包/类
public void optimizerInit() throws TddlException {
CostBasedOptimizer optimizer = new CostBasedOptimizer();
optimizer.setExpireTime(GeneralUtil.getExtraCmdLong(this.connectionProperties,
ExtraCmd.OPTIMIZER_CACHE_EXPIRE_TIME,
TddlConstants.DEFAULT_OPTIMIZER_EXPIRE_TIME));
optimizer.init();
this.optimizer = optimizer;
// RuleStatManager statManager = new RuleStatManager(optimizerRule,
// topologyHandler.getMatrix());
LocalStatManager statManager = new LocalStatManager();
statManager.init();
this.statManager = statManager;
}
示例3: initial
import com.taobao.tddl.optimizer.costbased.esitimater.stat.LocalStatManager; //导入依赖的package包/类
@BeforeClass
public static void initial() throws TddlException {
parser.init();
OptimizerContext context = new OptimizerContext();
TddlRule tddlRule = new TddlRule();
tddlRule.setAppRuleFile("classpath:" + rule_file);
tddlRule.setAppName(APPNAME);
tddlRule.init();
rule = new OptimizerRule(tddlRule);
StaticSchemaManager localSchemaManager = StaticSchemaManager.parseSchema(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(table_file));
Matrix matrix = MatrixParser.parse(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(matrix_file));
schemaManager = new RepoSchemaManager();
schemaManager.setLocal(localSchemaManager);
schemaManager.setGroup(matrix.getGroup("andor_mysql_group_0"));
schemaManager.init();
statManager = new LocalStatManager();
statManager.init();
context.setMatrix(matrix);
context.setRule(rule);
context.setSchemaManager(schemaManager);
context.setStatManager(statManager);
context.setIndexManager(new RuleIndexManager(schemaManager));
OptimizerContext.setContext(context);
optimizer = new CostBasedOptimizer(rule);
optimizer.setSqlParseManager(parser);
optimizer.init();
}
示例4: initial
import com.taobao.tddl.optimizer.costbased.esitimater.stat.LocalStatManager; //导入依赖的package包/类
@BeforeClass
public static void initial() throws TddlException {
parser.init();
OptimizerContext context = new OptimizerContext();
TddlRule tddlRule = new TddlRule();
tddlRule.setAppRuleFile("classpath:" + rule_file);
tddlRule.setAppName(APPNAME);
tddlRule.init();
rule = new OptimizerRule(tddlRule);
StaticSchemaManager localSchemaManager = StaticSchemaManager.parseSchema(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(table_file));
Matrix matrix = MatrixParser.parse(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(matrix_file));
schemaManager = new RepoSchemaManager();
schemaManager.setLocal(localSchemaManager);
schemaManager.setGroup(matrix.getGroup("andor_mysql_group_0"));
schemaManager.init();
statManager = new LocalStatManager();
statManager.init();
context.setMatrix(matrix);
context.setRule(rule);
context.setSchemaManager(schemaManager);
context.setStatManager(statManager);
context.setIndexManager(new RuleIndexManager(schemaManager));
OptimizerContext.setContext(context);
optimizer = new CostBasedOptimizer();
optimizer.setSqlParseManager(parser);
optimizer.init();
}
示例5: setLocal
import com.taobao.tddl.optimizer.costbased.esitimater.stat.LocalStatManager; //导入依赖的package包/类
public void setLocal(LocalStatManager local) {
this.local = local;
}
示例6: initial
import com.taobao.tddl.optimizer.costbased.esitimater.stat.LocalStatManager; //导入依赖的package包/类
@BeforeClass
public static void initial() throws TddlException {
parser.init();
OptimizerContext context = new OptimizerContext();
TddlRule tddlRule = new TddlRule();
tddlRule.setAppRuleFile("classpath:" + rule_file);
tddlRule.setAppName(APPNAME);
tddlRule.init();
rule = new OptimizerRule(tddlRule);
StaticSchemaManager localSchemaManager = StaticSchemaManager.parseSchema(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(table_file));
Matrix matrix = MatrixParser.parse(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(matrix_file));
schemaManager = new RepoSchemaManager();
schemaManager.setLocal(localSchemaManager);
schemaManager.setGroup(matrix.getGroup("andor_group_0"));
schemaManager.init();
statManager = LocalStatManager.parseConfig(GeneralUtil.getInputStream(table_stat_file),
GeneralUtil.getInputStream(table_index_stat_file));
// statManager = new RepoStatManager();
// statManager.setLocal(local);
// statManager.setUseCache(true);
// statManager.setGroup(matrix.getGroup("andor_group_0"));
// statManager.init();
context.setMatrix(matrix);
context.setRule(rule);
context.setSchemaManager(schemaManager);
context.setStatManager(statManager);
context.setIndexManager(new RuleIndexManager(schemaManager));
OptimizerContext.setContext(context);
optimizer = new CostBasedOptimizer(rule);
optimizer.setSqlParseManager(parser);
optimizer.init();
}
示例7: initial
import com.taobao.tddl.optimizer.costbased.esitimater.stat.LocalStatManager; //导入依赖的package包/类
@BeforeClass
public static void initial() throws TddlException {
parser.init();
OptimizerContext context = new OptimizerContext();
TddlRule tddlRule = new TddlRule();
tddlRule.setAppRuleFile("classpath:" + rule_file);
tddlRule.setAppName(APPNAME);
tddlRule.init();
rule = new OptimizerRule(tddlRule);
StaticSchemaManager localSchemaManager = StaticSchemaManager.parseSchema(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(table_file));
Matrix matrix = MatrixParser.parse(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(matrix_file));
schemaManager = new RepoSchemaManager();
schemaManager.setLocal(localSchemaManager);
schemaManager.setGroup(matrix.getGroup("andor_group_0"));
schemaManager.init();
statManager = LocalStatManager.parseConfig(Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(table_stat_file),
Thread.currentThread().getContextClassLoader().getResourceAsStream(table_index_stat_file));
// statManager = new RepoStatManager();
// statManager.setLocal(local);
// statManager.setUseCache(true);
// statManager.setGroup(matrix.getGroup("andor_group_0"));
// statManager.init();
context.setMatrix(matrix);
context.setRule(rule);
context.setSchemaManager(schemaManager);
context.setStatManager(statManager);
context.setIndexManager(new RuleIndexManager(schemaManager));
OptimizerContext.setContext(context);
optimizer = new CostBasedOptimizer();
optimizer.setSqlParseManager(parser);
optimizer.init();
}