public RangeInputSplit(RangeInputSplit split) throws IOException { this.range = split.getRange(); this.setLocations(split.getLocations()); this.setTableName(split.getTableName()); this.setTableId(split.getTableId()); }
scanner.setRange(split.getRange()); scannerBase = scanner;
scanner.setRange(baseSplit.getRange()); scannerBase = scanner; } else {
private static Scanner setupScanner(final Context context, final String tableName, final Configuration config) throws IOException { final RangeInputSplit split = (RangeInputSplit) context.getInputSplit(); final Range splitRange = split.getRange(); final Scanner scanner = AccumuloRyaUtils.getScanner(tableName, config); scanner.setRange(splitRange); return scanner; }
@Override public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { try { ByteArrayInputStream bais = new ByteArrayInputStream( context.getConfiguration().get(PROPS_CONF_KEY).getBytes(StandardCharsets.UTF_8)); env = new Environment(new FluoConfiguration(bais)); ti = new TransactionImpl(env, context.getConfiguration().getLong(TIMESTAMP_CONF_KEY, -1)); // TODO this uses non public Accumulo API! RangeInputSplit ris = (RangeInputSplit) split; Span span = SpanUtil.toSpan(ris.getRange()); HashSet<Column> columns = new HashSet<>(); for (String fam : context.getConfiguration().getStrings(FAMS_CONF_KEY, new String[0])) { columns.add(new Column(fam)); } cellIterator = ti.scanner().over(span).fetch(columns).build().iterator(); } catch (Exception e) { throw new IOException(e); } }
@Override public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { try { ByteArrayInputStream bais = new ByteArrayInputStream( context.getConfiguration().get(PROPS_CONF_KEY).getBytes(StandardCharsets.UTF_8)); env = new Environment(new FluoConfiguration(bais)); ti = new TransactionImpl(env, context.getConfiguration().getLong(TIMESTAMP_CONF_KEY, -1)); // TODO this uses non public Accumulo API! RangeInputSplit ris = (RangeInputSplit) split; Span span = SpanUtil.toSpan(ris.getRange()); HashSet<Column> columns = new HashSet<>(); for (String fam : context.getConfiguration().getStrings(FAMS_CONF_KEY, new String[0])) { columns.add(new Column(fam)); } cellIterator = ti.scanner().over(span).fetch(columns).build().iterator(); } catch (Exception e) { throw new IOException(e); } }
@Override public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { try { ByteArrayInputStream bais = new ByteArrayInputStream( context.getConfiguration().get(PROPS_CONF_KEY).getBytes(StandardCharsets.UTF_8)); env = new Environment(new FluoConfiguration(bais)); ti = new TransactionImpl(env, context.getConfiguration().getLong(TIMESTAMP_CONF_KEY, -1)); // TODO this uses non public Accumulo API! RangeInputSplit ris = (RangeInputSplit) split; Span span = SpanUtil.toSpan(ris.getRange()); HashSet<Column> columns = new HashSet<>(); for (String fam : context.getConfiguration().getStrings(FAMS_CONF_KEY, new String[0])) { columns.add(new Column(fam)); } rowIterator = ti.scanner().over(span).fetch(columns).byRow().build().iterator(); } catch (Exception e) { throw new IOException(e); } }
@Override public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { try { ByteArrayInputStream bais = new ByteArrayInputStream( context.getConfiguration().get(PROPS_CONF_KEY).getBytes(StandardCharsets.UTF_8)); env = new Environment(new FluoConfiguration(bais)); ti = new TransactionImpl(env, context.getConfiguration().getLong(TIMESTAMP_CONF_KEY, -1)); // TODO this uses non public Accumulo API! RangeInputSplit ris = (RangeInputSplit) split; Span span = SpanUtil.toSpan(ris.getRange()); HashSet<Column> columns = new HashSet<>(); for (String fam : context.getConfiguration().getStrings(FAMS_CONF_KEY, new String[0])) { columns.add(new Column(fam)); } rowIterator = ti.scanner().over(span).fetch(columns).byRow().build().iterator(); } catch (Exception e) { throw new IOException(e); } }
@Override public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { try { ByteArrayInputStream bais = new ByteArrayInputStream(context.getConfiguration().get(PROPS_CONF_KEY) .getBytes("UTF-8")); PropertiesConfiguration props = new PropertiesConfiguration(); props.load(bais); env = new Environment(new FluoConfiguration(props)); ti = new TransactionImpl(env, context.getConfiguration().getLong(TIMESTAMP_CONF_KEY, -1)); // TODO this uses non public Accumulo API! RangeInputSplit ris = (RangeInputSplit) split; Span span = SpanUtil.toSpan(ris.getRange()); ScannerConfiguration sc = new ScannerConfiguration().setSpan(span); for (String fam : context.getConfiguration().getStrings(FAMS_CONF_KEY, new String[0])) { sc.fetchColumnFamily(Bytes.of(fam)); } rowIter = ti.get(sc); } catch (Exception e) { throw new IOException(e); } }
@Override public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { try { ByteArrayInputStream bais = new ByteArrayInputStream(context.getConfiguration().get(PROPS_CONF_KEY) .getBytes("UTF-8")); PropertiesConfiguration props = new PropertiesConfiguration(); props.load(bais); env = new Environment(new FluoConfiguration(props)); ti = new TransactionImpl(env, context.getConfiguration().getLong(TIMESTAMP_CONF_KEY, -1)); // TODO this uses non public Accumulo API! RangeInputSplit ris = (RangeInputSplit) split; Span span = SpanUtil.toSpan(ris.getRange()); ScannerConfiguration sc = new ScannerConfiguration().setSpan(span); for (String fam : context.getConfiguration().getStrings(FAMS_CONF_KEY, new String[0])) { sc.fetchColumnFamily(Bytes.of(fam)); } rowIter = ti.get(sc); } catch (Exception e) { throw new IOException(e); } }
public RangeInputSplit(RangeInputSplit split) throws IOException { this.range = split.getRange(); this.setLocations(split.getLocations()); this.setTableName(split.getTableName()); this.setTableId(split.getTableId()); }
public RangeInputSplit(RangeInputSplit split) throws IOException { this.range = split.getRange(); this.setLocations(split.getLocations()); this.setTableName(split.getTableName()); this.setTableId(split.getTableId()); }
final Configuration conf = context.getConfiguration(); split = (RangeInputSplit) context.getInputSplit(); final Range range = split.getRange();
scanner.setRange(baseSplit.getRange()); scannerBase = scanner; } else {
scanner.setRange(split.getRange()); scannerBase = scanner;
scanner.setRange(baseSplit.getRange()); scannerBase = scanner; } else {
scanner.setRange(split.getRange()); scannerBase = scanner;