Example usage for org.apache.hadoop.hdfs.web.resources TokenArgumentParam TokenArgumentParam

List of usage examples for org.apache.hadoop.hdfs.web.resources TokenArgumentParam TokenArgumentParam

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.web.resources TokenArgumentParam TokenArgumentParam.

Prototype

public TokenArgumentParam(final String str) 

Source Link

Document

Constructor.

Usage

From source file:com.bigstep.datalake.DLFileSystem.java

License:Apache License

@Override
public synchronized long renewDelegationToken(final Token<?> token) throws IOException {
    final HttpOpParam.Op op = PutOpParam.Op.RENEWDELEGATIONTOKEN;
    return new FsPathResponseRunner<Long>(op, null, new TokenArgumentParam(token.encodeToUrlString())) {
        @Override/*  w ww.j a  v a2 s.  c o  m*/
        Long decodeResponse(Map<?, ?> json) throws IOException {
            return ((Number) json.get("long")).longValue();
        }
    }.run();
}

From source file:com.bigstep.datalake.DLFileSystem.java

License:Apache License

@Override
public synchronized void cancelDelegationToken(final Token<?> token) throws IOException {
    final HttpOpParam.Op op = PutOpParam.Op.CANCELDELEGATIONTOKEN;
    new FsPathRunner(op, null, new TokenArgumentParam(token.encodeToUrlString())).run();
}