Package org.apache.tajo.catalog

Examples of org.apache.tajo.catalog.Options


    Preconditions.checkNotNull(json);
    JsonObject jsonObject = json.getAsJsonObject();

    CatalogProtos.StoreType type = CatalogProtos.StoreType.valueOf(jsonObject.get("store").getAsString());

    Options options = null;
    if (jsonObject.get("options") != null) {
      options = context.deserialize(jsonObject.get("options"), Options.class);
    } else {
      throw new JsonParseException("Options not found in json");
View Full Code Here


    }
  }

  private void setUp() throws Exception {
    util = new LocalTajoTestingUtility();
    Options opt = new Options();
    opt.put(CSVFile.DELIMITER, "|");
    util.setup(names, paths, schemas, opt);
  }
View Full Code Here

    schema.addColumn("col10", Type.BLOB);
    schema.addColumn("col11", Type.INET4);
    schema.addColumn("col12", Type.NULL);
    schema.addColumn("col13", CatalogUtil.newDataType(Type.PROTOBUF, TajoIdProtos.QueryIdProto.class.getName()));

    Options options = new Options();
    TableMeta meta = CatalogUtil.newTableMeta(schema, storeType, options);

    Path tablePath = new Path(testDir, "testVariousTypes.data");
    Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(meta, tablePath);
    appender.init();
View Full Code Here

    schema.addColumn("id", Type.INT4);
    schema.addColumn("file", Type.TEXT);
    schema.addColumn("name", Type.TEXT);
    schema.addColumn("age", Type.INT8);
   
    Options options = new Options();
    TableMeta meta = CatalogUtil.newTableMeta(schema, storeType, options);

    Path table1Path = new Path(testDir, storeType + "_1.data");
    Appender appender1 = StorageManagerFactory.getStorageManager(conf).getAppender(meta, table1Path);
    appender1.enableStats();
View Full Code Here

    schema.addColumn("col9", Type.TEXT);
    schema.addColumn("col10", Type.BLOB);
    schema.addColumn("col11", Type.INET4);
    schema.addColumn("col12", Type.NULL);

    Options options = new Options();
    TableMeta meta = CatalogUtil.newTableMeta(schema, storeType, options);

    Path tablePath = new Path(testDir, "testVariousTypes.data");
    Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(meta, tablePath);
    appender.init();
View Full Code Here

    // if store plan (i.e., CREATE or INSERT OVERWRITE)
    StoreTableNode storeTableNode = PlannerUtil.findTopNode(getBlock().getPlan(), NodeType.STORE);
    if (storeTableNode != null) {
      storeType = storeTableNode.getStorageType();
    }
    meta = CatalogUtil.newTableMeta(channel.getSchema(), storeType, new Options());
    meta.setStat(stat);
    statistics = stat;
    setFinishTime();

    eventHandler.handle(new SubQuerySucceeEvent(getId(), meta));
View Full Code Here

    String [] data = {
        "1|filled|0.1",
        "2||",
        "3|filled|0.2"
    };
    Options opts = new Options();
    opts.put(CSVFile.DELIMITER, "|");
    ResultSet res = TajoTestingCluster
        .run(table, schemas, opts, new String[][]{data},
            "select * from nulltable1 where col3 is null");
    try {
      assertTrue(res.next());
View Full Code Here

    String [] data = {
        "1|filled|",
        "||",
        "3|filled|"
    };
    Options opts = new Options();
    opts.put(CSVFile.DELIMITER, "|");
    ResultSet res = TajoTestingCluster
        .run(table, schemas, opts, new String[][]{data},
            "select * from nulltable2 where col1 is not null");
    try {
      assertTrue(res.next());
View Full Code Here

    Schema [] schemas = new Schema[] {schema};
    String [] data = {
        ",,,,672287821,1301460,1,313895860387,126288907,1024",
        ",,,43578,19,13,6,3581,2557,1024"
    };
    Options opts = new Options();
    opts.put(CSVFile.DELIMITER, ",");
    ResultSet res = TajoTestingCluster
        .run(table, schemas, opts, new String[][]{data},
            "select * from nulltable3 where col1 is null and col2 is null and col3 is null and col4 = 43578");
    try {
      assertTrue(res.next());
View Full Code Here

    Schema [] schemas = new Schema[] {schema};
    String [] data = {
        "\\N,,,,672287821,",
        ",\\N,,43578"
    };
    Options opts = new Options();
    opts.put(CSVFile.DELIMITER, ",");
    opts.put(CSVFile.NULL, "\\\\N");
    ResultSet res = TajoTestingCluster
        .run(table, schemas, opts, new String[][]{data},
            "select * from nulltable4 where col1 is null and col2 is null and col3 is null and col5 is null and col4 = 43578");
    try {
      assertTrue(res.next());
View Full Code Here

TOP

Related Classes of org.apache.tajo.catalog.Options

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.