beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Robertson (JIRA)" <>
Subject [jira] [Commented] (BEAM-2457) Error: "Unable to find registrar for hdfs" - need to prevent/improve error message
Date Fri, 29 Sep 2017 13:41:00 GMT


Tim Robertson commented on BEAM-2457:

I got to the bottom of this for my case.  The TL;DR to make sure you have this when sharing
up the über jar:
  <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>

A service loader is used to register the {{FileSystemRegistrar}}.  You can see which are registered
    Set<FileSystemRegistrar> registrars =
      ServiceLoader.load(FileSystemRegistrar.class, ReflectHelpers.findClassLoader())));

    for (FileSystemRegistrar reg : registrars) {

Assuming you have built an über jar to submit, what is loaded is defined by the classes listed
in the {{/META-INF/service/}} file (you can expand
your jar and take a look).  When there are several on the build path the first will win, and
the HDFS one may not be used.  Merging at build time using Maven shading can be like so:
      <!-- Shade the project into an über jar to send to Spark -->
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>

With this done, the resulting file will read as:

I hope this helps someone else.  For a Cloudera CDH (presumable HW too) environment, when
running on a gateway machine all the rest of the Hadoop config should just get picked up automatically
and nothing else should be needed.

> Error: "Unable to find registrar for hdfs" - need to prevent/improve error message
> ----------------------------------------------------------------------------------
>                 Key: BEAM-2457
>                 URL:
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>    Affects Versions: 2.0.0
>            Reporter: Stephen Sisk
>            Assignee: Flavio Fiszman
> I've noticed a number of user reports where jobs are failing with the error message "Unable
to find registrar for hdfs": 
> *
> *
> *

> This isn't too many reports, but it is the only time I can recall so many users reporting
the same error message in a such a short amount of time. 
> We believe the problem is one of two things: 
> 1) bad uber jar creation
> 2) incorrect HDFS configuration
> However, it's highly possible this could have some other root cause. 
> It seems like it'd be useful to:
> 1) Follow up with the above reports to see if they've resolved the issue, and if so what
fixed it. There may be another root cause out there.
> 2) Improve the error message to include more information about how to resolve it
> 3) See if we can improve detection of the error cases to give more specific information
(specifically, if HDFS is miconfigured, can we detect that somehow and tell the user exactly
> 4) update documentation

This message was sent by Atlassian JIRA

View raw message