if (autoAdjust) { RangeInputSplit split = new RangeInputSplit(tableName, tableId.canonicalID(), ke.clip(r), new String[] {location}); org.apache.accumulo.core.clientImpl.mapreduce.SplitUtils.updateSplit(split, tableConfig, logLevel); split.setOffline(tableConfig.isOfflineScan()); split.setIsolatedScan(tableConfig.shouldUseIsolatedScanners()); split.setUsesLocalIterators(tableConfig.shouldUseLocalIterators()); splits.add(split); } else { RangeInputSplit split = new RangeInputSplit(tableName, tableId.canonicalID(), entry.getKey(), entry.getValue().toArray(new String[0])); org.apache.accumulo.core.clientImpl.mapreduce.SplitUtils.updateSplit(split, tableConfig, logLevel); split.setOffline(tableConfig.isOfflineScan()); split.setIsolatedScan(tableConfig.shouldUseIsolatedScanners()); split.setUsesLocalIterators(tableConfig.shouldUseLocalIterators());
@Override public String[] getLocations() throws IOException { return split.getLocations(); } }
Assert.assertEquals(getAdminPrincipal(), risplit.getPrincipal()); Assert.assertEquals(table, risplit.getTableName()); Assert.assertEquals(getAdminToken(), risplit.getToken()); Assert.assertEquals(auths, risplit.getAuths()); Assert.assertEquals(getConnector().getInstance().getInstanceName(), risplit.getInstanceName()); Assert.assertEquals(isolated, risplit.isIsolatedScan()); Assert.assertEquals(localIters, risplit.usesLocalIterators()); Assert.assertEquals(fetchColumns, risplit.getFetchedColumns()); Assert.assertEquals(level, risplit.getLogLevel());
if (null == rangeSplit.getIterators() || (rangeSplit.getIterators().isEmpty() && !iterators.isEmpty())) { log.debug("Re-setting iterators on InputSplit due to Accumulo bug."); rangeSplit.setIterators(iterators); if (null == rangeSplit.getTableName()) { rangeSplit.setTableName(accumuloParams.getAccumuloTableName());
public HiveAccumuloSplit() { super((Path) null, 0, 0, (String[]) null); split = new RangeInputSplit(); }
if (null == rangeSplit.getIterators() || (rangeSplit.getIterators().isEmpty() && !iterators.isEmpty())) { log.debug("Re-setting iterators on InputSplit due to Accumulo bug."); rangeSplit.setIterators(iterators);
@Override public long getLength() { int len = 0; try { return split.getLength(); } catch (IOException e) { log.error("Error getting length for split: " + StringUtils.stringifyException(e)); } return len; }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); split.readFields(in); }
@Override public void map(Key k, Value v, OutputCollector<Key,Value> output, Reporter reporter) throws IOException { try { String tableName = ((RangeInputSplit) reporter.getInputSplit()).getTableName(); if (key != null) assertEquals(key.getRow().toString(), new String(v.get())); assertEquals(new Text(String.format("%s_%09x", tableName, count + 1)), k.getRow()); assertEquals(String.format("%s_%09x", tableName, count), new String(v.get())); } catch (AssertionError e) { e1 = e; } key = new Key(k); count++; }
public HiveAccumuloSplit() { super((Path) null, 0, 0, (String[]) null); split = new RangeInputSplit(); }
@Override public long getLength() { int len = 0; try { return split.getLength(); } catch (IOException e) { log.error("Error getting length for split: " + StringUtils.stringifyException(e)); } return len; }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); split.readFields(in); }
if (autoAdjust) { RangeInputSplit split = new RangeInputSplit(tableName, tableId.canonicalID(), ke.clip(r), new String[] {location}); SplitUtils.updateSplit(split, tableConfig, logLevel); split.setOffline(tableConfig.isOfflineScan()); split.setIsolatedScan(tableConfig.shouldUseIsolatedScanners()); split.setUsesLocalIterators(tableConfig.shouldUseLocalIterators()); RangeInputSplit split = new RangeInputSplit(tableName, tableId.canonicalID(), entry.getKey(), entry.getValue().toArray(new String[0])); SplitUtils.updateSplit(split, tableConfig, logLevel); split.setOffline(tableConfig.isOfflineScan()); split.setIsolatedScan(tableConfig.shouldUseIsolatedScanners()); split.setUsesLocalIterators(tableConfig.shouldUseLocalIterators());
@Override public String[] getLocations() throws IOException { return split.getLocations(); } }
if (autoAdjust) { RangeInputSplit split = new RangeInputSplit(tableName, tableId, ke.clip(r), new String[] {location}); SplitUtils.updateSplit(split, instance, tableConfig, principal, token, auths, logLevel); split.setOffline(tableConfig.isOfflineScan()); split.setIsolatedScan(tableConfig.shouldUseIsolatedScanners()); split.setUsesLocalIterators(tableConfig.shouldUseLocalIterators()); RangeInputSplit split = new RangeInputSplit(tableName, tableId, entry.getKey(), entry.getValue().toArray(new String[0])); SplitUtils.updateSplit(split, instance, tableConfig, principal, token, auths, logLevel); split.setOffline(tableConfig.isOfflineScan()); split.setIsolatedScan(tableConfig.shouldUseIsolatedScanners()); split.setUsesLocalIterators(tableConfig.shouldUseLocalIterators());