[
https://issues.apache.org/jira/browse/KNOX-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Khanh Maudoux updated KNOX-813:
-------------------------------
Description:
The ClientDSL for HDFS shoud provide the rename method.
It could be easily done with something like that :
{code:java}
protected Callable<Rename.Response> callable() {
return new Callable<Rename.Response>() {
@Override
public Rename.Response call() throws Exception {
URIBuilder uri = uri( Hdfs.SERVICE_PATH, file );
addQueryParam( uri, "op", "RENAME" );
addQueryParam( uri, "destination", to );
HttpPut request = new HttpPut( uri.build() );
return new Rename.Response( execute( request ) );
}
};
}
{code}
was:
The ClientDSL for HDFS shoud provide the rename method.
It could be easily done with something like that :
```
protected Callable<Rename.Response> callable() {
return new Callable<Rename.Response>() {
@Override
public Rename.Response call() throws Exception {
URIBuilder uri = uri( Hdfs.SERVICE_PATH, file );
addQueryParam( uri, "op", "RENAME" );
addQueryParam( uri, "destination", to );
HttpPut request = new HttpPut( uri.build() );
return new Rename.Response( execute( request ) );
}
};
}
```
> Add rename in HDFS for ClientDSL
> --------------------------------
>
> Key: KNOX-813
> URL: https://issues.apache.org/jira/browse/KNOX-813
> Project: Apache Knox
> Issue Type: Improvement
> Components: ClientDSL
> Affects Versions: 0.7.0
> Reporter: Khanh Maudoux
> Priority: Trivial
>
> The ClientDSL for HDFS shoud provide the rename method.
> It could be easily done with something like that :
> {code:java}
> protected Callable<Rename.Response> callable() {
> return new Callable<Rename.Response>() {
> @Override
> public Rename.Response call() throws Exception {
> URIBuilder uri = uri( Hdfs.SERVICE_PATH, file );
> addQueryParam( uri, "op", "RENAME" );
> addQueryParam( uri, "destination", to );
> HttpPut request = new HttpPut( uri.build() );
> return new Rename.Response( execute( request ) );
> }
> };
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)