[hadoop-swift] Added auth check before getData call
Without such check client doesn't try to authenticate during method call. This leads to read failure in case if this is the first use of client. Change-Id: Ib2389a83b4e73fac49066ffe0411ff430482f848 Closes-Bug: #1284906
This commit is contained in:
parent
3ba0ee2a1f
commit
fab9840abf
|
@ -637,6 +637,7 @@ public final class SwiftRestClient {
|
||||||
LOG.debug("getData:" + range);
|
LOG.debug("getData:" + range);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
preRemoteCommand("getData");
|
||||||
return getData(url,
|
return getData(url,
|
||||||
new Header(HEADER_RANGE, range),
|
new Header(HEADER_RANGE, range),
|
||||||
SwiftRestClient.NEWEST);
|
SwiftRestClient.NEWEST);
|
||||||
|
@ -656,6 +657,7 @@ public final class SwiftRestClient {
|
||||||
public HttpBodyContent getData(SwiftObjectPath path,
|
public HttpBodyContent getData(SwiftObjectPath path,
|
||||||
long offset,
|
long offset,
|
||||||
long length) throws IOException {
|
long length) throws IOException {
|
||||||
|
preRemoteCommand("getData");
|
||||||
return getData(pathToURI(path), offset, length);
|
return getData(pathToURI(path), offset, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,6 +710,7 @@ public final class SwiftRestClient {
|
||||||
public HttpBodyContent getData(SwiftObjectPath path,
|
public HttpBodyContent getData(SwiftObjectPath path,
|
||||||
final Header... requestHeaders)
|
final Header... requestHeaders)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
preRemoteCommand("getData");
|
||||||
return getData(pathToURI(path), requestHeaders);
|
return getData(pathToURI(path), requestHeaders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue