2016-05-12 110 views
0

我使用諾克斯DSL客戶端從一個Java類,像這樣明顯的:Eclipse的錯誤:類型Put.Request不是

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(); 
    } 
} 

然而,Eclipse是顯示錯誤:

The type Put.Request is not visible 

任何指針?

回答

0

它畢竟是扔誤差Put.Response是不可見的。所以更好的方法是在maven中添加以下依賴文件。

<dependency> 
    <groupId>org.apache.knox</groupId> 
    <artifactId>gateway-shell</artifactId> 
    <version>0.14.0</version> 
</dependency> 
相關問題