AnsweredAssumed Answered

Could not access MapR FileSystem from remote machine

Question asked by avp on Sep 10, 2013
Latest reply on Sep 12, 2013 by yufeldman
Hi I am using mapr 1.0.3.I am trying to access mapr file system from a remote machine where mapr installation is not available.
I am using the following code snippet
<code>

Configuration conf = new Configuration();
conf.set("fs.default.name", "maprfs://10.200.300.400:7222");
conf.set("fs.maprfs.impl", "com.mapr.fs.MapRFileSystem");
BufferedWriter br = null;
Path pt = new Path("maprfs://10.200.300.400:7222/user/test");
FileSystem fs = null;
try {
fs =  MapRFileSystem.get(URI.create("maprfs://10.200.300.400:7222/user/test"),conf);
br = new BufferedWriter(new OutputStreamWriter(fs.create(pt, true)));
</code>

Am getting the following exception

<pre>
java.lang.ExceptionInInitializerError
        at com.mapr.fs.ShimLoader.load(ShimLoader.java:159)
        at com.mapr.fs.MapRFileSystem.<clinit>(MapRFileSystem.java:1669)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:1510)
        at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1475)
        at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1569)
        at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2200)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2213)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:80)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2252)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2234)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:300)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.mapr.fs.ShimLoader.loadNativeLibrary(ShimLoader.java:244)
        at com.mapr.fs.ShimLoader.load(ShimLoader.java:146)
        ... 19 more
Caused by: java.lang.UnsatisfiedLinkError: no MapRClient in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at com.mapr.fs.shim.LibraryLoader.loadLibrary(LibraryLoader.java:41)
        ... 25 more
</pre>

Thanks,
Binitha

Outcomes