diff --git a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java index 38172594afb..e34730ff360 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java +++ b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java @@ -95,9 +95,7 @@ public RFileScannerEnvironmentImpl(Opts opts) { @Override public String getTableName(TableId tableId) throws TableNotFoundException { - Preconditions.checkArgument(tableId == TABLE_ID, "Expected " + TABLE_ID + " obtained" - + " from IteratorEnvironment.getTableId(), but got: " + tableId); - return TABLE_NAME; + return null; } @Override @@ -107,8 +105,6 @@ public Configuration getConfiguration() { @Override public Configuration getConfiguration(TableId tableId) { - Preconditions.checkArgument(tableId == TABLE_ID, "Expected " + TABLE_ID + " obtained" - + " from IteratorEnvironment.getTableId(), but got: " + tableId); return tableConf; } @@ -116,8 +112,6 @@ public Configuration getConfiguration(TableId tableId) { private static final byte[] EMPTY_BYTES = new byte[0]; private static final Range EMPTY_RANGE = new Range(); - private static final String TABLE_NAME = "rfileScanner"; - private static final TableId TABLE_ID = TableId.of(TABLE_NAME); private Range range; private BlockCacheManager blockCacheManager = null; @@ -309,7 +303,7 @@ public Iterator> iterator() { ClientIteratorEnvironment.Builder iterEnvBuilder = new ClientIteratorEnvironment.Builder() .withEnvironment(new RFileScannerEnvironmentImpl(opts)).withAuthorizations(opts.auths) - .withScope(IteratorScope.scan).withTableId(TABLE_ID); + .withScope(IteratorScope.scan).withTableId(null); if (getSamplerConfiguration() != null) { iterEnvBuilder.withSamplerConfiguration(getSamplerConfiguration()); iterEnvBuilder.withSamplingEnabled(); diff --git a/core/src/main/java/org/apache/accumulo/core/iteratorsImpl/ClientIteratorEnvironment.java b/core/src/main/java/org/apache/accumulo/core/iteratorsImpl/ClientIteratorEnvironment.java index 41a514f19aa..746d05602f6 100644 --- a/core/src/main/java/org/apache/accumulo/core/iteratorsImpl/ClientIteratorEnvironment.java +++ b/core/src/main/java/org/apache/accumulo/core/iteratorsImpl/ClientIteratorEnvironment.java @@ -75,7 +75,7 @@ public Builder isUserCompaction() { public Builder withTableId(TableId tableId) { checkState(this.tableId.isEmpty(), "TableId has already been set"); - this.tableId = Optional.of(tableId); + this.tableId = Optional.ofNullable(tableId); return this; }