public static JournalManager createJournal(Configuration conf, URI uri,
      NamespaceInfo nsInfo, NameNodeMetrics metrics) {
    Class<? extends JournalManager> clazz = getJournalClass(conf,
        uri.getScheme());

    try {
      Constructor<? extends JournalManager> cons = clazz.getConstructor(
          Configuration.class, URI.class, NamespaceInfo.class,
          NameNodeMetrics.class);
      return cons.newInstance(conf, uri, nsInfo, metrics);
    } catch (Exception e) {
      throw new IllegalArgumentException("Unable to construct journal, " + uri,
          e);
    }
  }
public static JournalManager createJournal ( Configuration conf , URI uri , NamespaceInfo nsInfo , NameNodeMetrics metrics ) { Class < ? extends JournalManager > clazz = getJournalClass ( conf , uri . getScheme ( ) ) ; try { Constructor < ? extends JournalManager > cons = clazz . getConstructor ( Configuration . class , URI . class , NamespaceInfo . class , NameNodeMetrics . class ) ; return cons . newInstance ( conf , uri , nsInfo , metrics ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( "Unable to construct journal, " + uri , e ) ; } }
Construct a custom journal manager.
The class to construct is taken from the configuration.
@param uri Uri to construct
@return The constructed journal manager
@throws IllegalArgumentException if no class is configured for uri