当前位置: 首页>>代码示例>>Java>>正文


Java StorageManagerFactory.getStorageManager方法代码示例

本文整理汇总了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);
}
 
开发者ID:apache,项目名称:incubator-tajo,代码行数:27,代码来源:QueryMaster.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-tajo,代码行数:30,代码来源:TestExecutionBlockCursor.java

示例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);
}
 
开发者ID:gruter,项目名称:tajo-cdh,代码行数:35,代码来源:TestExecutionBlockCursor.java

示例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.");
}
 
开发者ID:apache,项目名称:incubator-tajo,代码行数:45,代码来源:TajoMaster.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-tajo,代码行数:5,代码来源:TajoQueryEngine.java

示例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.");
}
 
开发者ID:gruter,项目名称:tajo-cdh,代码行数:47,代码来源:TajoMaster.java


注:本文中的org.apache.tajo.storage.StorageManagerFactory.getStorageManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。