Java – Not implemented by the Hadoop Jar implementation by S3FileSystem FileSystem

Not implemented by the Hadoop Jar implementation by S3FileSystem FileSystem… here is a solution to the problem.

Not implemented by the Hadoop Jar implementation by S3FileSystem FileSystem

I’ve added these build configurations in my maven pom because I’m looking to bundle Apache Solr dependencies with Jar. Otherwise I got SolarServerException: ClassNotFound, and now I don’t get that exception, but a new exception shown below (after the Pom fragment).

<build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass></mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

This creates two JAR files, one with dependencies and one simple jar.
Jar with Deps, throws this error

Exception in thread "main" java.lang.UnsupportedOperationException: Not implemented by the S3FileSystem FileSystem implementation
    at org.apache.hadoop.fs.FileSystem.getScheme(FileSystem.java:216)
    at org.apache.hadoop.fs.FileSystem.loadFileSystems(FileSystem.java:2564)
    at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2574)
    at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2591)
    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:91)
    at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2630)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2612)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:169)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:354)
    at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)
    at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPath(FileInputFormat.java:518)
    at com.myproj.core.NewWordCount.main(NewWordCount.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

Please help me see what went wrong, now Hadoop goes directly to the s3FileSystem implementation

Run it with this command.

hadoop jar com.myproj-0.0.1-SNAPSHOT-jar-with-dependencies.jar com.myproj.core.NewWordCount tempdata/file01 output10/

P.S. Working perfectly fine with simple jars (no dependencies).

Solution

You may need to remove the hadoop-core dependencies because you still have hadoop-hdfs (even if not directly).

Related Problems and Solutions