kevinrr888 commented on code in PR #4816:
URL: https://github.com/apache/accumulo/pull/4816#discussion_r1729469120
##########
core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java:
##########
@@ -335,6 +357,57 @@ public boolean isSamplingEnabled() {
public SamplerConfiguration getSamplerConfiguration() {
return RFileScanner.this.getSamplerConfiguration();
}
+
+ @Override
+ public TableId getTableId() {
+ return dummyTableId;
+ }
+
+ @Override
+ @Deprecated(since = "2.0.0")
+ public AccumuloConfiguration getConfig() {
+ return tableConf;
+ }
+
+ @Override
+ @Deprecated(since = "2.1.0")
+ public ServiceEnvironment getServiceEnv() {
+ return serviceEnvironment.get();
+ }
+
+ private ServiceEnvironment createServiceEnv() {
+ return new ServiceEnvironment() {
+ @Override
+ public <T> T instantiate(TableId tableId, String className, Class<T>
base)
+ throws ReflectiveOperationException {
+ return instantiate(className, base);
+ }
+
+ @Override
+ public <T> T instantiate(String className, Class<T> base)
+ throws ReflectiveOperationException {
+ return
this.getClass().getClassLoader().loadClass(className).asSubclass(base)
+ .getDeclaredConstructor().newInstance();
+ }
+
+ @Override
+ public String getTableName(TableId tableId) {
+ throw new UnsupportedOperationException(errorMsg);
Review Comment:
Instead of throwing an UOE, I throw an IllegalArgumentException. Let me know
if this approach is ok. Figured this might be a bit clearer from a user
perspective
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]