本文整理汇总了Java中org.apache.tajo.storage.StorageManagerFactory.getStorageManager方法的典型用法代码示例。如果您正苦于以下问题:Java StorageManagerFactory.getStorageManager方法的具体用法?Java StorageManagerFactory.getStorageManager怎么用?Java StorageManagerFactory.getStorageManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tajo.storage.StorageManagerFactory
的用法示例。
在下文中一共展示了StorageManagerFactory.getStorageManager方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.tajo.storage.StorageManagerFactory; //导入方法依赖的package包/类
public void init(Configuration conf) {
LOG.info("QueryMaster init");
try {
this.systemConf = (TajoConf)conf;
this.connPool = RpcConnectionPool.getPool(systemConf);
querySessionTimeout = systemConf.getIntVar(TajoConf.ConfVars.QUERY_SESSION_TIMEOUT);
queryMasterContext = new QueryMasterContext(systemConf);
clock = new SystemClock();
this.dispatcher = new TajoAsyncDispatcher("querymaster_" + System.currentTimeMillis());
addIfService(dispatcher);
this.storageManager = StorageManagerFactory.getStorageManager(systemConf);
globalPlanner = new GlobalPlanner(systemConf, workerContext);
dispatcher.register(QueryStartEvent.EventType.class, new QueryStartEventHandler());
} catch (Throwable t) {
LOG.error(t.getMessage(), t);
throw new RuntimeException(t);
}
super.init(conf);
}
示例2: setUp
import org.apache.tajo.storage.StorageManagerFactory; //导入方法依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
util = new TajoTestingCluster();
util.startCatalogCluster();
conf = util.getConfiguration();
catalog = util.getMiniCatalogCluster().getCatalog();
TPCH tpch = new TPCH();
tpch.loadSchemas();
tpch.loadOutSchema();
for (String table : tpch.getTableNames()) {
TableMeta m = CatalogUtil.newTableMeta(CatalogProtos.StoreType.CSV);
TableDesc d = CatalogUtil.newTableDesc(table, tpch.getSchema(table), m, CommonTestingUtil.getTestDir());
TableStats stats = new TableStats();
stats.setNumBytes(TPCH.tableVolumes.get(table));
d.setStats(stats);
catalog.addTable(d);
}
analyzer = new SQLAnalyzer();
logicalPlanner = new LogicalPlanner(catalog);
optimizer = new LogicalOptimizer(conf);
AbstractStorageManager sm = StorageManagerFactory.getStorageManager(conf);
dispatcher = new AsyncDispatcher();
dispatcher.init(conf);
dispatcher.start();
planner = new GlobalPlanner(conf, catalog);
}
示例3: setUp
import org.apache.tajo.storage.StorageManagerFactory; //导入方法依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
util = new TajoTestingCluster();
util.startCatalogCluster();
conf = util.getConfiguration();
conf.set(TajoConf.ConfVars.DIST_QUERY_BROADCAST_JOIN_AUTO.varname, "false");
catalog = util.getMiniCatalogCluster().getCatalog();
catalog.createTablespace(DEFAULT_TABLESPACE_NAME, "hdfs://localhost:!234/warehouse");
catalog.createDatabase(DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
TPCH tpch = new TPCH();
tpch.loadSchemas();
tpch.loadOutSchema();
for (String table : tpch.getTableNames()) {
TableMeta m = CatalogUtil.newTableMeta(CatalogProtos.StoreType.CSV);
TableDesc d = CatalogUtil.newTableDesc(
CatalogUtil.buildFQName(DEFAULT_DATABASE_NAME, table), tpch.getSchema(table), m, CommonTestingUtil.getTestDir());
TableStats stats = new TableStats();
stats.setNumBytes(TPCH.tableVolumes.get(table));
d.setStats(stats);
catalog.createTable(d);
}
analyzer = new SQLAnalyzer();
logicalPlanner = new LogicalPlanner(catalog);
optimizer = new LogicalOptimizer(conf);
AbstractStorageManager sm = StorageManagerFactory.getStorageManager(conf);
dispatcher = new AsyncDispatcher();
dispatcher.init(conf);
dispatcher.start();
planner = new GlobalPlanner(conf, catalog);
}
示例4: init
import org.apache.tajo.storage.StorageManagerFactory; //导入方法依赖的package包/类
@Override
public void init(Configuration _conf) {
this.systemConf = (TajoConf) _conf;
context = new MasterContext(systemConf);
clock = new SystemClock();
try {
RackResolver.init(systemConf);
initResourceManager();
initWebServer();
this.dispatcher = new AsyncDispatcher();
addIfService(dispatcher);
// check the system directory and create if they are not created.
checkAndInitializeSystemDirectories();
this.storeManager = StorageManagerFactory.getStorageManager(systemConf);
catalogServer = new CatalogServer(initBuiltinFunctions());
addIfService(catalogServer);
catalog = new LocalCatalogWrapper(catalogServer, systemConf);
globalEngine = new GlobalEngine(context);
addIfService(globalEngine);
queryJobManager = new QueryJobManager(context);
addIfService(queryJobManager);
tajoMasterClientService = new TajoMasterClientService(context);
addIfService(tajoMasterClientService);
tajoMasterService = new TajoMasterService(context);
addIfService(tajoMasterService);
} catch (Exception e) {
LOG.error(e.getMessage(), e);
}
super.init(systemConf);
LOG.info("Tajo Master is initialized.");
}
示例5: TajoQueryEngine
import org.apache.tajo.storage.StorageManagerFactory; //导入方法依赖的package包/类
public TajoQueryEngine(TajoConf conf) throws IOException {
this.storageManager = StorageManagerFactory.getStorageManager(conf);
this.phyPlanner = new PhysicalPlannerImpl(conf, storageManager);
}
示例6: init
import org.apache.tajo.storage.StorageManagerFactory; //导入方法依赖的package包/类
@Override
public void init(Configuration _conf) {
this.systemConf = (TajoConf) _conf;
context = new MasterContext(systemConf);
clock = new SystemClock();
try {
RackResolver.init(systemConf);
initResourceManager();
initWebServer();
this.dispatcher = new AsyncDispatcher();
addIfService(dispatcher);
// check the system directory and create if they are not created.
checkAndInitializeSystemDirectories();
this.storeManager = StorageManagerFactory.getStorageManager(systemConf);
catalogServer = new CatalogServer(initBuiltinFunctions());
addIfService(catalogServer);
catalog = new LocalCatalogWrapper(catalogServer);
sessionManager = new SessionManager(dispatcher);
addIfService(sessionManager);
globalEngine = new GlobalEngine(context);
addIfService(globalEngine);
queryJobManager = new QueryJobManager(context);
addIfService(queryJobManager);
tajoMasterClientService = new TajoMasterClientService(context);
addIfService(tajoMasterClientService);
tajoMasterService = new TajoMasterService(context);
addIfService(tajoMasterService);
} catch (Exception e) {
LOG.error(e.getMessage(), e);
throw new RuntimeException(e);
}
super.init(systemConf);
LOG.info("Tajo Master is initialized.");
}