Commit 7fada71 1 parent 3f9b0c6 commit 7fada71 Copy full SHA for 7fada71
File tree 4 files changed +17
-8
lines changed
core/src/main/java/org/apache/accumulo/core/trace
test/src/main/java/org/apache/accumulo/test
4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 21
21
import java .lang .reflect .InvocationHandler ;
22
22
import java .lang .reflect .InvocationTargetException ;
23
23
import java .lang .reflect .Proxy ;
24
+ import java .util .HashSet ;
24
25
import java .util .Map ;
26
+ import java .util .Set ;
25
27
import java .util .concurrent .Callable ;
26
28
27
29
import org .apache .accumulo .core .Constants ;
@@ -214,8 +216,19 @@ public static <T> T wrapService(final T instance) {
214
216
private static <T > T wrapRpc (final InvocationHandler handler , final T instance ) {
215
217
@ SuppressWarnings ("unchecked" )
216
218
T proxiedInstance = (T ) Proxy .newProxyInstance (instance .getClass ().getClassLoader (),
217
- instance .getClass (). getInterfaces ( ), handler );
219
+ getInterfaces ( instance .getClass ()). toArray ( new Class <?>[ 0 ] ), handler );
218
220
return proxiedInstance ;
219
221
}
220
222
223
+ private static Set <Class <?>> getInterfaces (Class <?> clazz ) {
224
+ var set = new HashSet <Class <?>>();
225
+ if (clazz != null ) {
226
+ set .addAll (getInterfaces (clazz .getSuperclass ()));
227
+ for (Class <?> interfaze : clazz .getInterfaces ()) {
228
+ set .add (interfaze );
229
+ }
230
+ }
231
+ return set ;
232
+ }
233
+
221
234
}
Original file line number Diff line number Diff line change 22
22
23
23
import org .apache .accumulo .core .cli .ConfigOpts ;
24
24
import org .apache .accumulo .core .clientImpl .thrift .TInfo ;
25
- import org .apache .accumulo .core .tabletscan .thrift .TabletScanClientService ;
26
25
import org .apache .accumulo .core .tabletserver .thrift .NoSuchScanIDException ;
27
26
import org .apache .accumulo .tserver .ScanServer ;
28
- import org .apache .accumulo .tserver .TabletHostingServer ;
29
27
import org .apache .thrift .TException ;
30
28
31
29
/**
32
30
* ScanServer implementation that will stop itself after the the 3rd scan batch scan
33
31
*
34
32
*/
35
- public class SelfStoppingScanServer extends ScanServer
36
- implements TabletScanClientService .Iface , TabletHostingServer {
33
+ public class SelfStoppingScanServer extends ScanServer {
37
34
38
35
private final AtomicInteger scanCount = new AtomicInteger (0 );
39
36
Original file line number Diff line number Diff line change 28
28
29
29
import org .apache .accumulo .compactor .Compactor ;
30
30
import org .apache .accumulo .core .cli .ConfigOpts ;
31
- import org .apache .accumulo .core .compaction .thrift .CompactorService .Iface ;
32
31
import org .apache .accumulo .core .compaction .thrift .TCompactionState ;
33
32
import org .apache .accumulo .core .compaction .thrift .TCompactionStatusUpdate ;
34
33
import org .apache .accumulo .core .dataImpl .KeyExtent ;
45
44
import org .slf4j .Logger ;
46
45
import org .slf4j .LoggerFactory ;
47
46
48
- public class ExternalDoNothingCompactor extends Compactor implements Iface {
47
+ public class ExternalDoNothingCompactor extends Compactor {
49
48
50
49
private static final Logger LOG = LoggerFactory .getLogger (ExternalDoNothingCompactor .class );
51
50
Original file line number Diff line number Diff line change 37
37
import org .slf4j .Logger ;
38
38
import org .slf4j .LoggerFactory ;
39
39
40
- public class MemoryConsumingCompactor extends Compactor implements CompactorService . Iface {
40
+ public class MemoryConsumingCompactor extends Compactor {
41
41
42
42
private static final Logger LOG = LoggerFactory .getLogger (MemoryConsumingCompactor .class );
43
43
You can’t perform that action at this time.
0 commit comments