Search in sources :

Example 1 with Response

use of org.apache.knox.gateway.shell.hdfs.Status.Response in project knox by apache.

the class WebHDFSCommand method exists.

private boolean exists(KnoxSession session, String path) {
    boolean rc = false;
    try {
        Response response = Hdfs.status(session).file(path).now();
        rc = response.exists();
    } catch (KnoxShellException e) {
    // NOP
    }
    return rc;
}
Also used : Response(org.apache.knox.gateway.shell.hdfs.Status.Response) KnoxShellException(org.apache.knox.gateway.shell.KnoxShellException)

Aggregations

KnoxShellException (org.apache.knox.gateway.shell.KnoxShellException)1 Response (org.apache.knox.gateway.shell.hdfs.Status.Response)1