Package org.apache.tajo.storage

Examples of org.apache.tajo.storage.Fragment


    JsonObject metaObj = fragObj.get("meta").getAsJsonObject();
    TableMetaImpl meta = new TableMetaImpl(
        gson.fromJson(metaObj.get("schema"), Schema.class),
        gson.fromJson(metaObj.get("storeType"), StoreType.class),
        gson.fromJson(metaObj.get("options"), Options.class));
    Fragment fragment = new Fragment(fragObj.get("tabletId").getAsString(),
        gson.fromJson(fragObj.get("path"), Path.class),
        meta,
        fragObj.get("startOffset").getAsLong(),
        fragObj.get("length").getAsLong());
    return fragment;
View Full Code Here


    c.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, "file:///");
    FileSystem fs = FileSystem.get(c);
    Path tablePath = new Path(file.getAbsolutePath());

    List<Fragment> listTablets = new ArrayList<Fragment>();
    Fragment tablet;

    FileStatus[] fileLists = fs.listStatus(tablePath);
    for (FileStatus f : fileLists) {
      if (f.getLen() == 0) {
        continue;
      }
      tablet = new Fragment(name, f.getPath(), meta, 0l, f.getLen());
      listTablets.add(tablet);
    }

    Fragment[] tablets = new Fragment[listTablets.size()];
    listTablets.toArray(tablets);
View Full Code Here

    String tbname = tablePath.getName();
    for (int i = 0; i < files.length; i++) {
      if (files[i].getLen() == 0) {
        continue;
      }
      fraglist.add(new Fragment(tbname + "_" + i, files[i].getPath(), meta, 0l, files[i].getLen()));
    }
    return fraglist;
  }
View Full Code Here

    }
    if (fragments == null) {
      fragments = new ArrayList<Fragment>();
    }
    for (int i = 0; i < p.getFragmentsCount(); i++) {
      fragments.add(new Fragment(p.getFragments(i)));
    }
    return this.fragments;
  }
View Full Code Here

        childBlocks[0] = masterPlan.getChild(execBlock.getId(), 0);
        childBlocks[1] = masterPlan.getChild(execBlock.getId(), 1);

        tablePath = storageManager.getTablePath(scans[i].getTableName());
        stats[i] = masterContext.getSubQuery(childBlocks[i].getId()).getTableStat();
        fragments[i] = new Fragment(scans[i].getCanonicalName(), tablePath,
            CatalogUtil.newTableMeta(scans[i].getInSchema(), StoreType.CSV), 0, 0);
      } else {
        tablePath = tableDesc.getPath();
        stats[i] = tableDesc.getMeta().getStat();
        fragments[i] = storageManager.getSplits(scans[i].getCanonicalName(),
View Full Code Here

    LOG.info("Try to divide " + mergedRange + " into " + determinedTaskNum +
        " sub ranges (total units: " + determinedTaskNum + ")");
    TupleRange [] ranges = partitioner.partition(determinedTaskNum);

    Fragment dummyFragment = new Fragment(scan.getTableName(), tablePath,
        CatalogUtil.newTableMeta(scan.getInSchema(), StoreType.CSV),0, 0);

    List<String> basicFetchURIs = new ArrayList<String>();

    for (QueryUnit qu : childSubQuery.getQueryUnits()) {
View Full Code Here

    ScanNode scan = execBlock.getScanNodes()[0];
    Path tablePath;
    tablePath = subQuery.getContext().getStorageManager().getTablePath(scan.getTableName());


    Fragment frag = new Fragment(scan.getCanonicalName(), tablePath,
        CatalogUtil.newTableMeta(scan.getInSchema(), StoreType.CSV), 0, 0);


    Map<String, List<IntermediateEntry>> hashedByHost;
    Map<Integer, List<URI>> finalFetchURI = new HashMap<Integer, List<URI>>();
View Full Code Here

TOP

Related Classes of org.apache.tajo.storage.Fragment

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.