Package org.apache.tajo.conf

Examples of org.apache.tajo.conf.TajoConf


  }

  @Test
  public final void testFailCreateTablePartitionedOtherExceptColumn() throws IOException,
      ServiceException, SQLException {
    TajoConf conf = cluster.getConfiguration();
    final String tableName = "testFailCreateTablePartitionedOtherExceptColumn";

    assertFalse(client.existTable(tableName));

    String rangeSql = "create table " + tableName + " (deptname text, score int4)";
View Full Code Here


  }

  @Test
  public final void testCreateAndDropTablePartitionedColumnByExecuteQuery() throws IOException,
      ServiceException, SQLException {
    TajoConf conf = cluster.getConfiguration();
    final String tableName = CatalogUtil.normalizeIdentifier("testCreateAndDropTablePartitionedColumnByExecuteQuery");

    assertFalse(client.existTable(tableName));

    String sql = "create table " + tableName + " (deptname text, score int4)";
View Full Code Here

  private TableDesc employee;

  private TableStats testDataStats;
  @Before
  public void setUp() throws Exception {
    this.conf = new TajoConf();
    util = new TajoTestingCluster();
    catalog = util.startCatalogCluster().getCatalog();
    testDir = CommonTestingUtil.getTestDir(TEST_PATH);
    catalog.createTablespace(DEFAULT_TABLESPACE_NAME, testDir.toUri().toString());
    catalog.createDatabase(DEFAULT_DATABASE_NAME, DEFAULT_TABLESPACE_NAME);
View Full Code Here

  private TajoTestingCluster util;

  @Before
  public void setup() throws Exception {
    this.randomValues = new HashMap<Integer, Integer>();
    this.conf = new TajoConf();
    util = new TajoTestingCluster();
    util.startCatalogCluster();
    catalog = util.getMiniCatalogCluster().getCatalog();

    Path workDir = CommonTestingUtil.getTestDir();
View Full Code Here

    ClientSocketChannelFactory channelFactory = RpcChannelFactory.createClientChannelFactory("Fetcher", 1);
    Fetcher fetcher = new Fetcher(uri, new File(OUTPUT_DIR + "data"), channelFactory);
    fetcher.get();
    server.stop();
   
    FileSystem fs = FileSystem.getLocal(new TajoConf());
    FileStatus inStatus = fs.getFileStatus(new Path(INPUT_DIR, "data"));
    FileStatus outStatus = fs.getFileStatus(new Path(OUTPUT_DIR, "data"));
    assertEquals(inStatus.getLen(), outStatus.getLen());
  }
View Full Code Here

  private static final int LOAD_NUM = 100;
  private static final String TEST_PATH = "target/test-data/TestSingleCSVFileBSTIndex";
  private Path testDir;
 
  public TestSingleCSVFileBSTIndex() {
    conf = new TajoConf();
    conf.setVar(ConfVars.ROOT_DIR, TEST_PATH);
    schema = new Schema();
    schema.addColumn(new Column("int", Type.INT4));
    schema.addColumn(new Column("long", Type.INT8));
    schema.addColumn(new Column("double", Type.FLOAT8));
View Full Code Here

  private static Random rnd = new Random(System.currentTimeMillis());

  @BeforeClass
  public static void setUp() throws Exception {
    conf = new TajoConf();
    util = TpchTestBase.getInstance().getTestingCluster();
    catalog = util.getMaster().getCatalog();
    workDir = CommonTestingUtil.getTestDir(TEST_PATH);
    sm = StorageManagerFactory.getStorageManager(conf, workDir);
View Full Code Here

      catalogURI = String.format("jdbc:derby:%s/db;create=true", path.toUri().getPath());
    }
    String connectionId = System.getProperty(CatalogConstants.CONNECTION_ID);
    String password = System.getProperty(CatalogConstants.CONNECTION_PASSWORD);

    TajoConf conf = new TajoConf();
    conf.set(CatalogConstants.STORE_CLASS, driverClass);
    conf.set(CATALOG_URI, catalogURI);
    conf.setVar(TajoConf.ConfVars.CATALOG_ADDRESS, "127.0.0.1:0");

    // MySQLStore requires password
    if (driverClass.equals(MySQLStore.class.getCanonicalName())) {
      if (connectionId == null) {
        throw new CatalogException(String.format("%s driver requires %s", driverClass, CatalogConstants.CONNECTION_ID));
      }
      conf.set(CatalogConstants.CONNECTION_ID, connectionId);
      if (password != null) {
        conf.set(CatalogConstants.CONNECTION_PASSWORD, password);
      }
    }

    Path defaultTableSpace = CommonTestingUtil.getTestDir();
View Full Code Here

    conf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, warehousePath.toUri().toString());
    conf.set(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname, jdbcUri);
    conf.set(TajoConf.ConfVars.WAREHOUSE_DIR.varname, warehousePath.toUri().toString());

    // create local HCatalogStore.
    TajoConf tajoConf = new TajoConf(conf);
    store = new HCatalogStore(tajoConf);
    store.createDatabase(DB_NAME, null);
  }
View Full Code Here

    Path workDir = CommonTestingUtil.getTestDir("target/test-data/testHashInnerJoin");
    TaskAttemptContext ctx = new TaskAttemptContext(conf,
        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
    ctx.setEnforcer(enforcer);

    TajoConf localConf = new TajoConf(conf);
    localConf.setLongVar(TajoConf.ConfVars.EXECUTOR_INNER_JOIN_INMEMORY_HASH_THRESHOLD, 100l);
    PhysicalPlannerImpl phyPlanner = new PhysicalPlannerImpl(localConf, sm);
    PhysicalExec exec = phyPlanner.createPlan(ctx, plan);

    ProjectionExec proj = (ProjectionExec) exec;
    assertTrue(proj.getChild() instanceof HashJoinExec);
View Full Code Here

TOP

Related Classes of org.apache.tajo.conf.TajoConf

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.