Github user StephanEwen commented on the issue:
https://github.com/apache/flink/pull/2418
Actually, it may be possible, and not too bad if we assume the Hashtable is
immutable. Something like this:
```java
public class HashtableWrapper extends Hashtable<String, String> {
private final Map<String, String> backingMap;
private final String name;
public HashtableWrapper(Map<String, String> backingMap, String name) {
super(1);
this.backingMap = backingMap;
this.name = name;
}
@Override
public synchronized V get(Object key) {
if ("name".equals(key)) {
return name;
} else {
return backingMap.get(key);
}
}
@Override
public synchronized String put(String key, String value) {
throw new UnsupportedOperationException("immutable hashtable");
}
// wrappers for Iterator to Enumeration
@Override
public synchronized Enumeration<String> keys() {
return new IteratorToEnumeration(backingMap.keySet());
}
@Override
public synchronized Enumeration<String> elements() {
return new IteratorToEnumeration(backingMap.valueSet());
}
// and so on ...
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---