Package org.apache.hadoop.zebra.mapred.TableExpr

Examples of org.apache.hadoop.zebra.mapred.TableExpr.LeafTableInfo


    try {
      StringBuilder sb = new StringBuilder();
      boolean sorted = expr.sortedSplitRequired();
      boolean first = true;
      for (Iterator<LeafTableInfo> it = leaves.iterator(); it.hasNext();) {
        LeafTableInfo leaf = it.next();
        BasicTable.Reader reader =
          new BasicTable.Reader(leaf.getPath(), conf);
        reader.setProjection(leaf.getProjection());
        BasicTableStatus s = reader.getStatus();
        status.add(s);
        readers.add(reader);
        if (first)
          first = false;
View Full Code Here


    try {
      String projection = getProjection(conf);
      List<LeafTableInfo> leaves = expr.getLeafTables(projection);
      Iterator<LeafTableInfo> iterator = leaves.iterator();
      while (iterator.hasNext()) {
        LeafTableInfo leaf = iterator.next();
        BasicTable.Reader reader =
            new BasicTable.Reader(leaf.getPath(), conf);
        reader.setProjection(projection);
        reader.close();
      }
    } catch (ParseException e) {
      throw new IOException("Projection parsing failed : "+e.getMessage());
View Full Code Here

    ArrayList<BasicTableStatus> status =
        new ArrayList<BasicTableStatus>(nLeaves);

    try {
      for (Iterator<LeafTableInfo> it = leaves.iterator(); it.hasNext();) {
        LeafTableInfo leaf = it.next();
        BasicTable.Reader reader =
          new BasicTable.Reader(leaf.getPath(), conf);
        reader.setProjection(leaf.getProjection());
        BasicTableStatus s = reader.getStatus();
        if ((s.getRows() != 0) && (s.getSize() > 0)) {
          // skipping empty tables.
          // getRows() may return -1 to indicate unknown row numbers.
          readers.add(reader);
View Full Code Here

    try {
      String projection = getProjection(conf);
      List<LeafTableInfo> leaves = expr.getLeafTables(projection);
      Iterator<LeafTableInfo> iterator = leaves.iterator();
      while (iterator.hasNext()) {
        LeafTableInfo leaf = iterator.next();
        BasicTable.Reader reader =
            new BasicTable.Reader(leaf.getPath(), conf);
        reader.setProjection(projection);
        reader.close();
      }
    } catch (ParseException e) {
      throw new IOException("Projection parsing failed : "+e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.hadoop.zebra.mapred.TableExpr.LeafTableInfo

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.