@Override public ScannerBuilder scanner() { return tx.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)); } 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)); } 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); } }