<div dir="ltr">Hi Ross,<div><br></div><div>I tried your scenario and was able to reproduce the issue. So, I filed bug <a href="https://bugs.launchpad.net/savanna/+bug/1284906">https://bugs.launchpad.net/savanna/+bug/1284906</a> to track that.</div>
<div><br></div><div>Root cause of the issue is that auth check is missing in getData method of swift driver for hadoop. So, it fails to read data if this is the first requested operation (driver checks if destination directory exists when destination is in swift, that's why swift->swift works fine).</div>
<div><br></div><div>I've created patch for hadoop-swift driver: <a href="https://review.openstack.org/#/c/76405/">https://review.openstack.org/#/c/76405/</a>. Jar and images will be updated once it is reviewed by community and merged.</div>
<div><br></div><div>I see several workarounds for you:</div><div>1. Bug is in recent code that adds data locality feature support. If you don't plan to use data locality in initial testing you can use older version of hadoop-swift driver (<a href="http://savanna-files.mirantis.com/hadoop-swift/hadoop-swift-2013-07-08.jar">http://savanna-files.mirantis.com/hadoop-swift/hadoop-swift-2013-07-08.jar</a>). You should place this file on all nodes as /usr/share/hadoop/lib/hadoop-swift.jar.</div>
<div>2. Issue happens only if data locality is disabled. You can enable data locality in savanna. Refer to savanna docs how to do it.</div><div>3. I can send you jar with issue fixed (or you can build it by yourself from code with <a href="https://review.openstack.org/#/c/76405/">https://review.openstack.org/#/c/76405/</a> applied).</div>
<div><br></div><div>Thanks,</div><div>Andrew.</div><div><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_quote">From: <b class="gmail_sendername">Lillie Ross-CDSR11</b> <span dir="ltr"><<a href="mailto:Ross.Lillie@motorolasolutions.com" target="_blank">Ross.Lillie@motorolasolutions.com</a>></span><br>

Date: Wed, Feb 26, 2014 at 2:21 AM<br>Subject: [Openstack] Hadoop/Swift/Savanna native filesystem integration<br>To: "<a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a>" <<a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a>><br>

<br><br>



<div style="word-wrap:break-word">
All,
<div><br>
</div>
<div>I’m trying to integrate and test access to/from our Swift storage ring via our Hadoop cluster.</div>
<div><br>
</div>
<div>After setting the HDFS permissions, I’m able to perform the following tests using the Swift/Hadoop file system:</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>distcp swift://{container}.{provider}/object swift://{container}.{provider}/new-object</div>
<div><span style="white-space:pre-wrap"></span>distcp hdfs://{node}:{port}/object swift://{container}.{provider}/new-object</div>
<div><br>
</div>
<div>However, I’m not able to use distcp to move objects from Swift to HDFS storage. The log file from the final attempt to create the associated map task is as follows:</div>
<div><br>
</div>
2014-02-25 22:10:38,570 DEBUG org.apache.hadoop.fs.swift.snative.SwiftNativeFileSystem: Initializing SwiftNativeFileSystem against URI <br>
<a>swift://data.os/blob1</a> and working dir <a>
swift://data.os/user/ubuntu</a><br>
2014-02-25 22:10:38,593 DEBUG org.apache.hadoop.fs.swift.http.RestClientBindings: Filesystem
<a>swift://data.os/blob1</a> is using configurati<br>
on keys fs.swift.service.os<br>
2014-02-25 22:10:38,594 DEBUG org.apache.hadoop.fs.swift.http.SwiftRestClient: Service={os} container={data} uri={<a href="http://KEYSTONE:5" target="_blank">http://KEYSTONE:5</a><br>
000/v2.0/tokens} tenant={test} user={tester} region={(none)} publicURL={true} location aware={false} partition size={4718592 KB}, buff<br>
er size={64 KB} block size={32768 KB} connect timeout={15000}, retry count={3} socket timeout={60000} throttle delay={0}<br>
2014-02-25 22:10:38,594 DEBUG org.apache.hadoop.fs.swift.snative.SwiftNativeFileSystem: SwiftFileSystem initialized<br>
2014-02-25 22:10:38,599 DEBUG org.apache.hadoop.fs.swift.snative.SwiftNativeFileSystemStore: Reading
<a>swift://data.os/blob1</a> from proxy n<br>
ode<br>
2014-02-25 22:10:38,607 INFO org.apache.hadoop.tools.DistCp: FAIL blob1 : org.apache.hadoop.fs.swift.exceptions.SwiftInternalStateExcep<br>
tion: Null Endpoint -client is not authenticated<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.swift.http.SwiftRestClient.checkNotNull(SwiftRestClient.java:1800)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.swift.http.SwiftRestClient.pathToURI(SwiftRestClient.java:1629)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.swift.http.SwiftRestClient.pathToURI(SwiftRestClient.java:1669)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.swift.http.SwiftRestClient.getData(SwiftRestClient.java:711)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.swift.snative.SwiftNativeFileSystemStore.getObject(SwiftNativeFileSystemStore.java:294)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.swift.snative.SwiftNativeInputStream.<init>(SwiftNativeInputStream.java:103)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.swift.snative.SwiftNativeFileSystem.open(SwiftNativeFileSystem.java:555)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.swift.snative.SwiftNativeFileSystem.open(SwiftNativeFileSystem.java:536)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.fs.FileSystem.open(FileSystem.java:436)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.tools.DistCp$CopyFilesMapper.copy(DistCp.java:419)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.tools.DistCp$CopyFilesMapper.map(DistCp.java:547)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.tools.DistCp$CopyFilesMapper.map(DistCp.java:314)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.MapTask.run(MapTask.java:366)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.Child$4.run(Child.java:255)<br>
<span style="white-space:pre-wrap"></span>at java.security.AccessController.doPrivileged(Native Method)<br>
<span style="white-space:pre-wrap"></span>at javax.security.auth.Subject.doAs(Subject.java:415)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.Child.main(Child.java:249)<br>
<br>
2014-02-25 22:10:47,700 INFO org.apache.hadoop.mapred.TaskLogsTruncater: Initializing logs' truncater with mapRetainSize=-1 and reduceR<br>
etainSize=-1<br>
2014-02-25 22:10:47,723 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:tester cause:java.io.IOExc<br>
eption: Copied: 0 Skipped: 0 Failed: 1<br>
2014-02-25 22:10:47,725 WARN org.apache.hadoop.mapred.Child: Error running child<br>
java.io.IOException: Copied: 0 Skipped: 0 Failed: 1<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.tools.DistCp$CopyFilesMapper.close(DistCp.java:582)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.MapTask.run(MapTask.java:366)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.Child$4.run(Child.java:255)<br>
<span style="white-space:pre-wrap"></span>at java.security.AccessController.doPrivileged(Native Method)<br>
<span style="white-space:pre-wrap"></span>at javax.security.auth.Subject.doAs(Subject.java:415)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)<br>
<span style="white-space:pre-wrap"></span>at org.apache.hadoop.mapred.Child.main(Child.java:249)<br>
2014-02-25 22:10:47,739 INFO org.apache.hadoop.mapred.Task: Runnning cleanup for the task<br>
ubuntu@slave1:/var/log/hadoop/ubuntu/userlogs/job_201402252129_0006/attempt_201402252129_0006_m_000000_3$ <br>
<br>
<div>The hadoop distcp command entered was:</div>
<div><br>
</div>
<div>master$ hadoop distcp -D fs.swift.service.os.public=true -D fs.swift.service.os.tenant=test -D fs.swift.service.os.username=tester -D fs.swift.service.os.password=supersecret
<a>swift://data.os/blob1</a> hdfs://<hdfs ip>:9000/data/blob3</div>
<div><br>
</div>
<div>Am I missing anything obvious?</div>
<div><br>
<div>Thanks and regards,</div>
<div>Ross</div>
<div><br>
</div>
<br>
<br>
<div>--<br>
Ross Lillie<br>
Distinguished Member of Technical Staff<br>
Motorola Solutions, Inc.<br>
<br>
<a href="http://motorolasolutions.com" target="_blank">motorolasolutions.com</a><br>
O: <a href="tel:%2B1.847.576.0012" value="+18475760012" target="_blank">+1.847.576.0012</a><br>
M: <a href="tel:%2B1.847.980.2241" value="+18479802241" target="_blank">+1.847.980.2241</a><br>
E: <a href="mailto:ross.lillie@motorolasolutions.com" target="_blank">ross.lillie@motorolasolutions.com</a><br>
<br>
<br>
<span><img height="33" width="277" src="cid:75FF7557-F6FD-4406-A0BB-5CBD9BE3780A@comm.mot.com"></span></div>
<br>
</div>
</div>

<br>_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br></div><br></div>
</blockquote></div><br></div></div></div>