Examples of TableSplit


Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

  /**
   * TODO: use TableSnapshotRegionSplit HBASE-11555 is fixed.
   */
  public HBaseSplit(InputSplit snapshotSplit, Path dummyPath) {
    super(dummyPath, 0, 0, (String[]) null);
    this.tableSplit = new TableSplit();
    this.snapshotSplit = snapshotSplit;
    this.isTableSplit = false;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

    InputSplit split,
    JobConf jobConf,
    final Reporter reporter) throws IOException {

    HBaseSplit hbaseSplit = (HBaseSplit) split;
    TableSplit tableSplit = hbaseSplit.getTableSplit();

    setHTable(HiveHBaseInputFormatUtil.getTable(jobConf));
    setScan(HiveHBaseInputFormatUtil.getScan(jobConf));

    Job job = new Job(jobConf);
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

    @Override
    public WritableComparable<InputSplit> getSplitComparable(InputSplit split)
            throws IOException {
        return new WritableComparable<InputSplit>() {
            TableSplit tsplit = new TableSplit();

            @Override
            public void readFields(DataInput in) throws IOException {
                tsplit.readFields(in);
}

            @Override
            public void write(DataOutput out) throws IOException {
                tsplit.write(out);
            }

            @Override
            public int compareTo(InputSplit split) {
                return tsplit.compareTo((TableSplit) split);
            }
        };
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

    @Override
    public WritableComparable<InputSplit> getSplitComparable(InputSplit split)
            throws IOException {
        return new WritableComparable<InputSplit>() {
            TableSplit tsplit = new TableSplit();

            @Override
            public void readFields(DataInput in) throws IOException {
                tsplit.readFields(in);
}

            @Override
            public void write(DataOutput out) throws IOException {
                tsplit.write(out);
            }

            @Override
            public int compareTo(InputSplit split) {
                return tsplit.compareTo((TableSplit) split);
            }
        };
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

    InputSplit split,
    JobConf jobConf,
    final Reporter reporter) throws IOException {

    HBaseSplit hbaseSplit = (HBaseSplit) split;
    TableSplit tableSplit = hbaseSplit.getSplit();
    String hbaseTableName = jobConf.get(HBaseSerDe.HBASE_TABLE_NAME);
    setHTable(new HTable(HBaseConfiguration.create(jobConf), Bytes.toBytes(hbaseTableName)));
    String hbaseColumnsMapping = jobConf.get(HBaseSerDe.HBASE_COLUMNS_MAPPING);
    List<Integer> readColIDs = ColumnProjectionUtils.getReadColumnIDs(jobConf);
    List<ColumnMapping> columnsMapping = null;
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

      } else {
        throw new IOException(comparisonOp + " is not a supported comparison operator");
      }
    }
    if (tableSplit != null) {
      tableSplit = new TableSplit(
        tableSplit.getTableName(),
        startRow,
        stopRow,
        tableSplit.getRegionLocation());
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

    }
    if (trr == null) {
      trr = new TableRecordReader();
    }
   
    TableSplit tSplit = (TableSplit)split;
   
    Scan scan = new Scan(scans[0]);   
    scan.setStartRow(tSplit.getStartRow());
    scan.setStopRow(tSplit.getEndRow());
   
    trr.setScan(scan);
    trr.setHTable(table);
    trr.init();
   
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

        if ((startRow.length == 0 || keys.getSecond()[i].length == 0 || Bytes.compareTo(startRow, keys.getSecond()[i]) < 0) &&
           (stopRow.length == 0 || Bytes.compareTo(stopRow, keys.getFirst()[i]) > 0)) {
          byte[] splitStart = startRow.length == 0 || Bytes.compareTo(keys.getFirst()[i], startRow) >= 0 ? keys.getFirst()[i: startRow;
          byte[] splitStop = (stopRow.length == 0 || Bytes.compareTo(keys.getSecond()[i], stopRow) <= 0)
                    && keys.getSecond()[i].length > 0 ? keys.getSecond()[i] : stopRow;
          InputSplit split = new TableSplit(table.getTableName(), splitStart, splitStop, regionLocation);
          splits.add(split);
        }
      }
    }
   
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.TableSplit

    @Override
    public WritableComparable<InputSplit> getSplitComparable(InputSplit split)
            throws IOException {
        return new WritableComparable<InputSplit>() {
            TableSplit tsplit = new TableSplit();

            @Override
            public void readFields(DataInput in) throws IOException {
                tsplit.readFields(in);
}

            @Override
            public void write(DataOutput out) throws IOException {
                tsplit.write(out);
            }

            @Override
            public int compareTo(InputSplit split) {
                return tsplit.compareTo((TableSplit) split);
            }
        };
    }
View Full Code Here

Examples of org.hypertable.mapreduce.TableSplit

      Text end = new Text(rangeVector[i+1]);

      int u = rangeVector[i+2].indexOf("_");
      Text location = new Text(rangeVector[i+2].substring(0,u));

      splits[i] = new TableSplit(m_tableName, start, end, location);
    }

    return splits;
  }
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.