accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Fuchs <>
Subject Re: Hadoop 2 compatibility issues
Date Wed, 15 May 2013 21:31:38 GMT
It seems like the ideal option would be to have one binary build that
determines Hadoop version and switches appropriately at runtime. Has anyone
attempted to do this yet, and do we have an enumeration of the places in
Accumulo code where the incompatibilities show up?

One of the incompatibilities is in org.apache.hadoop.mapreduce.JobContext
switching between an abstract class and an interface. This can be fixed
with something to the effect of:

  public static Configuration getConfiguration(JobContext context) {
    Impl impl = new Impl();
    Configuration configuration = null;
    try {
      Class c =
      Method m = c.getMethod("getConfiguration");
      Object o = m.invoke(context, new Object[0]);
      configuration = (Configuration)o;
    } catch (Exception e) {
      throw new RuntimeException(e);
    return configuration;

Based on a test I just ran, using that getConfiguration method instead of
just calling the getConfiguration method on context should avoid the one
incompatibility. Maybe with a couple more changes like that we can get down
to one bytecode release for all known Hadoop versions?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message