Eclipse error : The type Put.Request is not visible

139 Views Asked by At

I'm using the knox client dsl from a Java class like so:

package org.apache.camel;

...
import org.apache.hadoop.gateway.shell.Hadoop;
import org.apache.hadoop.gateway.shell.hdfs.Hdfs;

public class KnoxProducer extends DefaultProducer {


    public KnoxProducer(KnoxEndpoint endpoint) {
        super(endpoint);
        this.endpoint = endpoint;
    }

    public void process(Exchange exchange) throws Exception {
        ...
        Hadoop session = Hadoop.login( gateway, username, password );
        Hdfs.put(session).text(body).to(path).now();

        //   ^ Eclipse Error: The type Put.Request is not visible

        session.shutdown();
    }
}

However, Eclipse is showing an error:

 The type Put.Request is not visible

Any pointers?

2

There are 2 best solutions below

0
On BEST ANSWER

This was a bug, the details are here: https://issues.apache.org/jira/browse/KNOX-713

It is fixed for Apache Knox 0.9.1

0
On

Still it is throwing error as Put.Response is not visible . so the better approach is add the following dependency file in the maven.

<dependency>
    <groupId>org.apache.knox</groupId>
    <artifactId>gateway-shell</artifactId>
    <version>0.14.0</version>
</dependency>