Examples of TableMeta


Examples of com.alibaba.otter.canal.parse.inbound.TableMeta

            rowChangeBuider.setEventType(eventType);
            RowsLogBuffer buffer = event.getRowsBuf(charset.name());
            BitSet columns = event.getColumns();
            BitSet changeColumns = event.getColumns();
            TableMeta tableMeta = null;
            if (tableMetaCache != null) {// 入错存在table meta cache
                tableMeta = tableMetaCache.getTableMeta(fullname);
                if (tableMeta == null) {
                    throw new CanalParseException("not found [" + fullname + "] in db , pls check!");
                }
View Full Code Here

Examples of com.alibaba.otter.canal.parse.inbound.TableMeta

            rowChangeBuider.setEventType(eventType);
            RowsLogBuffer buffer = event.getRowsBuf(charset.name());
            BitSet columns = event.getColumns();
            BitSet changeColumns = event.getColumns();
            TableMeta tableMeta = null;
            if (tableMetaCache != null) {// 入错存在table meta cache
                tableMeta = tableMetaCache.getTableMeta(fullname);
                if (tableMeta == null) {
                    throw new CanalParseException("not found [" + fullname + "] in db , pls check!");
                }
View Full Code Here

Examples of com.alibaba.otter.canal.parse.inbound.TableMeta

            rowChangeBuider.setEventType(eventType);

            RowsLogBuffer buffer = event.getRowsBuf(charset.name());
            BitSet columns = event.getColumns();
            BitSet changeColumns = event.getColumns();
            TableMeta tableMeta = null;
            if (tableMetaCache != null) {// 入错存在table meta cache
                tableMeta = tableMetaCache.getTableMeta(fullname);
                if (tableMeta == null) {
                    throw new CanalParseException("not found [" + fullname + "] in db , pls check!");
                }
View Full Code Here

Examples of org.apache.tajo.catalog.TableMeta

      options = context.deserialize(jsonObject.get("options"), Options.class);
    } else {
      throw new JsonParseException("Options not found in json");

    }
    return new TableMeta(type, options);
  }
View Full Code Here

Examples of org.apache.tajo.catalog.TableMeta

    return appender;
  }


  public TableMeta getTableMeta(Path tablePath) throws IOException {
    TableMeta meta;

    FileSystem fs = tablePath.getFileSystem(conf);
    Path tableMetaPath = new Path(tablePath, ".meta");
    if (!fs.exists(tableMetaPath)) {
      throw new FileNotFoundException(".meta file not found in " + tablePath.toString());
    }

    FSDataInputStream tableMetaIn = fs.open(tableMetaPath);

    CatalogProtos.TableProto tableProto = (CatalogProtos.TableProto) FileUtil.loadProto(tableMetaIn,
        CatalogProtos.TableProto.getDefaultInstance());
    meta = new TableMeta(tableProto);

    return meta;
  }
View Full Code Here

Examples of org.apache.tajo.catalog.TableMeta

      Path localPath = new Path(tablepaths[i]);
      Path tablePath = new Path(rootDir, names[i]);
      fs.mkdirs(tablePath);
      Path dfsPath = new Path(tablePath, localPath.getName());
      fs.copyFromLocalFile(localPath, dfsPath);
      TableMeta meta = CatalogUtil.newTableMeta(schemas[i],
          CatalogProtos.StoreType.CSV, option);
      client.createExternalTable(names[i], tablePath, meta);
    }

    LOG.info("===================================================");
View Full Code Here

Examples of org.apache.tajo.catalog.TableMeta

    Schema schema = new Schema();
    schema.addColumn("id", TajoDataTypes.Type.INT4);
    schema.addColumn("age", TajoDataTypes.Type.INT4);
    schema.addColumn("name", TajoDataTypes.Type.TEXT);

    TableMeta meta = CatalogUtil.newTableMeta(schema, CatalogProtos.StoreType.CSV);

    Tuple[] tuples = new Tuple[4];
    for(int i=0; i < tuples.length; i++) {
      tuples[i] = new VTuple(3);
      tuples[i].put(new Datum[] {
View Full Code Here

Examples of org.apache.tajo.catalog.TableMeta

    Schema schema = new Schema();
    schema.addColumn("key", TajoDataTypes.Type.TEXT);
    schema.addColumn("age", TajoDataTypes.Type.INT4);
    schema.addColumn("name", TajoDataTypes.Type.TEXT);

    TableMeta meta = CatalogUtil.newTableMeta(schema, CatalogProtos.StoreType.CSV);


    Path path = StorageUtil.concatPath(testDir, "testPartitionFile", "table.csv");
    fs.mkdirs(path.getParent());
    Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(meta, path);
View Full Code Here

Examples of org.apache.tajo.catalog.TableMeta

    if (splitable) {
      Schema schema = new Schema();
      schema.addColumn("id", Type.INT4);
      schema.addColumn("age", Type.INT8);

      TableMeta meta = CatalogUtil.newTableMeta(schema, storeType);
      Path tablePath = new Path(testDir, "Splitable.data");
      Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(meta, tablePath);
      appender.enableStats();
      appender.init();
      int tupleNum = 10000;
View Full Code Here

Examples of org.apache.tajo.catalog.TableMeta

    Schema schema = new Schema();
    schema.addColumn("id", Type.INT4);
    schema.addColumn("age", Type.INT8);
    schema.addColumn("score", Type.FLOAT4);

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

    Path tablePath = new Path(testDir, "testProjection.data");
    Appender appender = StorageManagerFactory.getStorageManager(conf).getAppender(meta, tablePath);
    appender.init();
    int tupleNum = 10000;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.