dlmarion commented on code in PR #5490: URL: https://github.com/apache/accumulo/pull/5490#discussion_r2054584893
########## core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java: ########## @@ -292,15 +280,54 @@ public Iterator<Entry<Key,Value>> iterator() { EMPTY_BYTES, tableConf); } + ClientServiceEnvironmentImpl senv = new ClientServiceEnvironmentImpl(null) { + + @Override + public String getTableName(TableId tableId) throws TableNotFoundException { + throw new IllegalStateException("TableId not known in RFileScanner"); + } + + @Override + public <T> T instantiate(String className, Class<T> base) + throws ReflectiveOperationException, IOException { + return RFileScanner.class.getClassLoader().loadClass(className).asSubclass(base) + .getDeclaredConstructor().newInstance(); + } + + @Override + public <T> T instantiate(TableId tableId, String className, Class<T> base) + throws ReflectiveOperationException, IOException { + return instantiate(className, base); + } + + @Override + public Configuration getConfiguration() { + return new ConfigurationImpl(new ConfigurationCopy(DefaultConfiguration.getInstance())); + } + + @Override + public Configuration getConfiguration(TableId tableId) { + return new ConfigurationImpl(new ConfigurationCopy(opts.tableConfig)); Review Comment: Fixed in bf294a4 ########## core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java: ########## @@ -292,15 +280,54 @@ public Iterator<Entry<Key,Value>> iterator() { EMPTY_BYTES, tableConf); } + ClientServiceEnvironmentImpl senv = new ClientServiceEnvironmentImpl(null) { + + @Override + public String getTableName(TableId tableId) throws TableNotFoundException { + throw new IllegalStateException("TableId not known in RFileScanner"); + } + + @Override + public <T> T instantiate(String className, Class<T> base) + throws ReflectiveOperationException, IOException { + return RFileScanner.class.getClassLoader().loadClass(className).asSubclass(base) + .getDeclaredConstructor().newInstance(); + } + + @Override + public <T> T instantiate(TableId tableId, String className, Class<T> base) + throws ReflectiveOperationException, IOException { + return instantiate(className, base); + } + + @Override + public Configuration getConfiguration() { + return new ConfigurationImpl(new ConfigurationCopy(DefaultConfiguration.getInstance())); + } + + @Override + public Configuration getConfiguration(TableId tableId) { + return new ConfigurationImpl(new ConfigurationCopy(opts.tableConfig)); + } + + }; + + ClientIteratorEnvironment.Builder iterEnvBuilder = + new RFileScannerIteratorEnvironmentBuilder().withEnvironment(senv) + .withAuthorizations(opts.auths).withScope(IteratorScope.scan); + if (getSamplerConfiguration() != null) { + iterEnvBuilder.withSamplerConfiguration(getSamplerConfiguration()); + } + IteratorEnvironment iterEnv = iterEnvBuilder.build(); Review Comment: Fixed in bf294a4 ########## core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java: ########## @@ -292,15 +280,54 @@ public Iterator<Entry<Key,Value>> iterator() { EMPTY_BYTES, tableConf); } + ClientServiceEnvironmentImpl senv = new ClientServiceEnvironmentImpl(null) { + + @Override + public String getTableName(TableId tableId) throws TableNotFoundException { + throw new IllegalStateException("TableId not known in RFileScanner"); Review Comment: Fixed in bf294a4 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org