hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Kostyrka <andr...@kostyrka.org>
Subject Re: HDFS access/Jython examples
Date Mon, 07 Apr 2008 16:48:06 GMT
Ok, I've traced it down to the following problem in
S3FileSystem.initialize():

    this.localFs = get(URI.create("file:///"), conf);

Why this bombs I have no idea.

OTOH, the cool thing here is, it's the last line, which means that
catching this exception, and ignoring might help me in my quest to
read/write data to HDFS/S3.

Andreas

Am Montag, den 07.04.2008, 18:21 +0200 schrieb Andreas Kostyrka:
> Well, I'm getting the following funny errors:
> 
> Traceback (innermost last):
>   File "test.py", line 13, in ?
> 	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1177)
> 	at org.apache.hadoop.fs.FileSystem.access$300(FileSystem.java:53)
> 	at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1191)
> 	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:148)
> 	at org.apache.hadoop.fs.FileSystem.getNamed(FileSystem.java:122)
> 	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:94)
> 	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:585)
> 
> My source code is:
> 
> import sys, glob, os
> 
> sys.path.append("./hadoop-0.16.2-core.jar")
> sys.path.extend(glob.glob("lib/*.jar"))
> from org.apache.hadoop.fs import *
> from org.apache.hadoop.conf import Configuration, Configured
> from org.apache.hadoop.fs.s3 import S3FileSystem, Jets3tFileSystemStore
> from java.net import URI
> c = Configuration()
> c.set("fs.default.name", "s3://loohad")
> c.set("fs.s3.awsAccessKeyId", "1SKTFXXJKF5EXJ7S5202")
> c.set("fs.s3.awsSecretAccessKey", "MyKEY")
> fs = FileSystem.get(c)
> print fs
> 

Mime
View raw message