@Test public void testCompatibility() { Method m = MapReduceUtils.getOverriddenMethod(WordCount.TokenizerMapper.class, "map", long.class, Record.class, com.aliyun.odps.mapred.TaskContext.class); Assert.assertNotNull(m); }
static Method getOverriddenMethod(Class<?> clz, String methodName, Class<?>... args) { List<Method> methods = null; while (clz != null) { methods = ReflectionUtils.findUserClassMethods(clz, methodName); for (Method m : methods) { if (m != null && isAssignable(m.getParameterTypes(), args)) { return m; } } clz = clz.getSuperclass(); } return null; }
MapReduceUtils { static Method getOverriddenMethod(Class<?> clz, String methodName, Class<?>... args) { List<Method> methods = null; while (clz != null) { methods = ReflectionUtils.findUserClassMethods(clz, methodName); for (Method m : methods) { if (m != null && isAssignable(m.getParameterTypes(), args)) { return m; } } clz = clz.getSuperclass(); } return null; } }
MapReduceUtils { static Method getOverriddenMethod(Class<?> clz, String methodName, Class<?>... args) { List<Method> methods = null; while (clz != null) { methods = ReflectionUtils.findUserClassMethods(clz, methodName); for (Method m : methods) { if (m != null && isAssignable(m.getParameterTypes(), args)) { return m; } } clz = clz.getSuperclass(); } return null; }  }
MapReduceUtils { static Method getOverriddenMethod(Class<?> clz, String methodName, Class<?>... args) { List<Method> methods = null; while (clz != null) { methods = ReflectionUtils.findUserClassMethods(clz, methodName); for (Method m : methods) { if (m != null && isAssignable(m.getParameterTypes(), args)) { return m; } } clz = clz.getSuperclass(); } return null; }  static void runMapper(Class<Mapper> clz, Mapper.TaskContext ctx); static void runReducer(Class<Reducer> clz, Reducer.TaskContext ctx); static boolean partSpecInclusive(TableInfo desc, TableInfo existing); }
MapReduceUtils { static Method getOverriddenMethod(Class<?> clz, String methodName, Class<?>... args) { List<Method> methods = null; while (clz != null) { methods = ReflectionUtils.findUserClassMethods(clz, methodName); for (Method m : methods) { if (m != null && isAssignable(m.getParameterTypes(), args)) { return m; } } clz = clz.getSuperclass(); } return null; }  static void runMapper(Class<Mapper> clz, Mapper.TaskContext ctx); static void runReducer(Class<Reducer> clz, Reducer.TaskContext ctx); static boolean partSpecInclusive(TableInfo desc, TableInfo existing);  }