<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How do you use webhdfs in Java through Knox? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159501#M121890</link>
    <description>&lt;P&gt;Found this &lt;A href="https://github.com/wdavidw/webhdfs-java-client" target="_blank"&gt;https://github.com/wdavidw/webhdfs-java-client&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Personally why not just use java hdfs api?&lt;/P&gt;&lt;P&gt;&lt;A href="http://tutorials.techmytalk.com/2014/08/16/hadoop-hdfs-java-api/" target="_blank"&gt;http://tutorials.techmytalk.com/2014/08/16/hadoop-hdfs-java-api/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Feb 2016 06:49:23 GMT</pubDate>
    <dc:creator>aervits</dc:creator>
    <dc:date>2016-02-26T06:49:23Z</dc:date>
    <item>
      <title>How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159500#M121889</link>
      <description>&lt;P&gt;I have some groovy code which works:&lt;/P&gt;&lt;PRE&gt;session = Hadoop.login( "https://etc-lab1-edge01-10:8888/gateway/ehihadoop02", "guest", "guest-password" )
text = Hdfs.ls( session ).dir( "/tmp/guest" ).now().string
import groovy.json.JsonSlurper
json = (new JsonSlurper()).parseText( text )
println json.FileStatuses.FileStatus.pathSuffix
&lt;/PRE&gt;&lt;P&gt;How do I do the same thing in Java? I've tried the following:&lt;/P&gt;&lt;PRE&gt;String webHdfsUrl = "webhdfs://etc-lab1-edge01-10:8888/";
String dir = "/tmp/guest";
Configuration hdfsConfig = new Configuration();
FileSystem fs = FileSystem.get(URI.create(webHdfsUrl), hdfsConfig);
RemoteIterator&amp;lt;LocatedFileStatus&amp;gt; files = fs.listFiles(new Path(dir), false);
while (files.hasNext()) {
	LocatedFileStatus srcFile = files.next();
	String path = Path.getPathWithoutSchemeAndAuthority(srcFile.getPath()).toString();
	System.out.println(path);
}
&lt;/PRE&gt;&lt;P&gt;But I get java.net.SocketException: Unexpected end of file from server. &lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 06:20:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159500#M121889</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-02-26T06:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159501#M121890</link>
      <description>&lt;P&gt;Found this &lt;A href="https://github.com/wdavidw/webhdfs-java-client" target="_blank"&gt;https://github.com/wdavidw/webhdfs-java-client&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Personally why not just use java hdfs api?&lt;/P&gt;&lt;P&gt;&lt;A href="http://tutorials.techmytalk.com/2014/08/16/hadoop-hdfs-java-api/" target="_blank"&gt;http://tutorials.techmytalk.com/2014/08/16/hadoop-hdfs-java-api/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 06:49:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159501#M121890</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-26T06:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159502#M121891</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/687/christopherwmenke.html" nodeid="687"&gt;@Kit Menke &lt;/A&gt;check &lt;A href="https://cwiki.apache.org/confluence/display/KNOX/Examples+WebHDFS#ExamplesWebHDFS-WebHDFSviaKnoxShellDSL"&gt;this &lt;/A&gt;for an interactive Java Knox DSL shell, where you can test your approach and later compile the parts you need. &lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 07:40:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159502#M121891</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-02-26T07:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159503#M121892</link>
      <description>&lt;P&gt;I've seen that (see the first part of my question). I'm trying to create a Java app.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 22:33:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159503#M121892</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-02-26T22:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159504#M121893</link>
      <description>&lt;P&gt;Yep that is what I'm trying to use (see second part of my question) but I can't get it working. I've made some progress which I'll post in a new answer.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 22:38:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159504#M121893</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-02-26T22:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159505#M121894</link>
      <description>&lt;P&gt;First problem with my code was that I should be trying to use SECURE webhdfs (still not sure why I was getting a SocketException). The protocol for secure webhdfs should be &lt;STRONG&gt;swebhdfs&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Second problem was an SSLHandshakeException. I used the VM arg -Djavax.net.debug=all and realized Java didn't trust the SSL connection and we were using a self-signed certificate. So I exported the cert from Chrome and imported it into a new truststore. Adding a VM arg to point to the new truststore seemed to fix that &lt;STRONG&gt;-Djavax.net.ssl.trustStore=C:\Apps\truststore&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;-----------&lt;/P&gt;&lt;P&gt;After some more research, looks like using the Java API through Knox is not supported in 0.6.0. &lt;A href="https://mail-archives.apache.org/mod_mbox/knox-user/201511.mbox/%3CCACRbFyiy77fc5EHQ5c5oOQM=MZ_UPmEVsoH7ERmDrEuoOvNbjg@mail.gmail.com%3E"&gt;More info here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 23:34:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159505#M121894</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-02-26T23:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159506#M121895</link>
      <description>&lt;P&gt;Is your webhdfs Port and namenodes URL correct?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 23:38:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159506#M121895</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-26T23:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159507#M121896</link>
      <description>&lt;P&gt;Hmm yea I think you're right. I debugged WebHdfsFileSystem and it looks like is trying the wrong url /webhdfs/v1/ vs /gateway/ehihadoop02/webhdfs/v1. I think Knox is confusing it.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 00:26:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159507#M121896</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-02-27T00:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159508#M121897</link>
      <description>&lt;P&gt;Looks like it is not supported in the existing FileSystem API. I updated my answer.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 03:30:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159508#M121897</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-02-27T03:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159509#M121898</link>
      <description>&lt;P&gt;
	Sorry it took me a while to response here but I was putting together a working sample.  The first important point is that I think people tend to overestimate the complexity of dealing with the REST APIs, especially WebHDFS.  The point of having REST APIs after all is supposed to be very thin clients.  I played with a few different Java HTTP client libraries and to my surprise the venerable Java HttpsUrlConnection resulted in the cleanest examples.  The Apache HttpClient is certainly an option and might be warranted in more complex situations.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
	IMPORTANT: Before you continue however please note that these examples are setup to circumvent both SSL hostname and certificate validation.  This is not acceptable in production but often helps in samples to make sure they don't become a barrier to success.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;
	I'll show the heart of the solution below but the full answer can be found here: &lt;A href="https://github.com/kminder/knox-webhdfs-client-examples"&gt;https://github.com/kminder/knox-webhdfs-client-examples&lt;/A&gt;.  Specifically here: &lt;A href="https://github.com/kminder/knox-webhdfs-client-examples/blob/master/src/test/java/net/minder/KnoxWebHdfsJavaClientExamplesTest.java"&gt;https://github.com/kminder/knox-webhdfs-client-examples/blob/master/src/test/java/net/minder/KnoxWebHdfsJavaClientExamplesTest.java&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	Now for the code.  The first is an example of the simplest of operations: GETHOMEDIRECTORY.&lt;/P&gt;
&lt;PRE&gt;@Test
public void getHomeDirExample() throws Exception {
  HttpsURLConnection connection;
  InputStream input;
  JsonNode json;
  connection = createHttpUrlConnection( WEBHDFS_URL + "?op=GETHOMEDIRECTORY" );
  input = connection.getInputStream();
  json = MAPPER.readTree( input );
  input.close();
  connection.disconnect();
  assertThat( json.get( "Path" ).asText(), is( "/user/"+TEST_USERNAME ) );
}
&lt;/PRE&gt;&lt;P&gt;
	Next a more complicated sample that writes and reads a file to HDFS via the CREATE and OPEN operations.&lt;/P&gt;
&lt;PRE&gt;@Test
public void putGetFileExample() throws Exception {
  HttpsURLConnection connection;
  String redirect;
  InputStream input;
  OutputStream output;

  String data = UUID.randomUUID().toString();

  connection = createHttpUrlConnection( WEBHDFS_URL + "/tmp/" + data + "/?op=CREATE" );
  connection.setRequestMethod( "PUT" );
  assertThat( connection.getResponseCode(), is(307) );
  redirect = connection.getHeaderField( "Location" );
  connection.disconnect();

  connection = createHttpUrlConnection( redirect );
  connection.setRequestMethod( "PUT" );
  connection.setDoOutput( true );
  output = connection.getOutputStream();
  IOUtils.write( data.getBytes(), output );
  output.close();
  connection.disconnect();
  assertThat( connection.getResponseCode(), is(201) );

  connection = createHttpUrlConnection( WEBHDFS_URL + "/tmp/" + data + "/?op=OPEN" );
  assertThat( connection.getResponseCode(), is(307) );
  redirect = connection.getHeaderField( "Location" );
  connection.disconnect();

  connection = createHttpUrlConnection( redirect );
  input = connection.getInputStream();
  assertThat( IOUtils.toString( input ), is( data ) );
  input.close();
  connection.disconnect();
}
&lt;/PRE&gt;&lt;P&gt;Now of course you have probably noticed that all of the "magic" is hidden in that createHttpUrlConnection method.  Not really magic at all but this is where the "un-securing" of SSL happens.  This also takes care of setting up HTTP BasicAuth for authentication and disables redirects which should be done when using the WebHDFS REST APIs.&lt;/P&gt;&lt;PRE&gt;private HttpsURLConnection createHttpUrlConnection( URL url ) throws Exception {
  HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
  conn.setHostnameVerifier( new TrustAllHosts() );
  conn.setSSLSocketFactory( TrustAllCerts.createInsecureSslContext().getSocketFactory() );
  conn.setInstanceFollowRedirects( false );
  String credentials = TEST_USERNAME + ":" + TEST_PASSWORD;
  conn.setRequestProperty( "Authorization", "Basic " + DatatypeConverter.printBase64Binary(credentials.getBytes() ) );
  return conn;
}

private HttpsURLConnection createHttpUrlConnection( String url ) throws Exception {
  return createHttpUrlConnection( new URL( url ) );
}
&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Mar 2016 03:26:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159509#M121898</guid>
      <dc:creator>kevin_minder</dc:creator>
      <dc:date>2016-03-01T03:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159510#M121899</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/687/christopherwmenke.html" nodeid="687"&gt;@Kit Menke&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 09:18:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159510#M121899</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-03-01T09:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159511#M121900</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/190/kevinminder.html" nodeid="190"&gt;@Kevin Minder&lt;/A&gt; This is awesome! Thank you!!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 23:58:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159511#M121900</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-03-01T23:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159512#M121901</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/687/christopherwmenke.html" nodeid="687"&gt;@Kit Menke&lt;/A&gt; could you please explain why we cann't use FileSystem API? I went through the link you provided above (More info here) but didn't quite understand. I am specifically looking to use Java Api for Knox instead of HTTP client. &lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 05:38:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159512#M121901</guid>
      <dc:creator>nhgodwal</dc:creator>
      <dc:date>2017-11-30T05:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use webhdfs in Java through Knox?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159513#M121902</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/19597/how-do-you-use-webhdfs-in-java-through-knox.html#"&gt;@Kit Menke&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Could
 you please let me know if you were able to call knox webhdfs via JAVA. I
 am trying same but I get the following exception at &lt;/P&gt;&lt;P&gt;Hdfs.ls( session ).dir( "/" ).now().getString()&lt;/P&gt;&lt;P&gt;log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).&lt;BR /&gt;log4j:WARN Please initialize the log4j system properly.&lt;BR /&gt;log4j:WARN See &lt;A href="http://logging.apache.org/log4j/1.2/faq.html#noconfig" target="_blank"&gt;http://logging.apache.org/log4j/1.2/faq.html#noconfig&lt;/A&gt; for more info.&lt;BR /&gt;Exception
 in thread "main" org.apache.knox.gateway.shell.HadoopException: 
javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to 
find valid certification path to requested target&lt;BR /&gt;   at org.apache.knox.gateway.shell.AbstractRequest.now(AbstractRequest.java:85)&lt;BR /&gt;   at webhdfsclient.program.main(program.java:23)&lt;BR /&gt;Caused
 by: javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to 
find valid certification path to requested target&lt;BR /&gt;   at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)&lt;BR /&gt;   at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959)&lt;BR /&gt;   at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)&lt;BR /&gt;   at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)&lt;BR /&gt;   at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514)&lt;BR /&gt;   at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)&lt;BR /&gt;   at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)&lt;BR /&gt;   at sun.security.ssl.Handshaker.process_record(Handshaker.java:961)&lt;BR /&gt;   at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)&lt;BR /&gt;   at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)&lt;BR /&gt;   at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)&lt;BR /&gt;   at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)&lt;BR /&gt;   at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396)&lt;BR /&gt;   at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)&lt;BR /&gt;   at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)&lt;BR /&gt;   at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)&lt;BR /&gt;   at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)&lt;BR /&gt;   at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)&lt;BR /&gt;   at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)&lt;BR /&gt;   at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)&lt;BR /&gt;   at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)&lt;BR /&gt;   at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)&lt;BR /&gt;   at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)&lt;BR /&gt;   at org.apache.knox.gateway.shell.Hadoop.executeNow(Hadoop.java:256)&lt;BR /&gt;   at org.apache.knox.gateway.shell.AbstractRequest.execute(AbstractRequest.java:50)&lt;BR /&gt;   at org.apache.knox.gateway.shell.hdfs.Ls$Request.access$200(Ls.java:31)&lt;BR /&gt;   at org.apache.knox.gateway.shell.hdfs.Ls$Request$1.call(Ls.java:51)&lt;BR /&gt;   at org.apache.knox.gateway.shell.hdfs.Ls$Request$1.call(Ls.java:45)&lt;BR /&gt;   at org.apache.knox.gateway.shell.AbstractRequest.now(AbstractRequest.java:83)&lt;BR /&gt;   ... 1 more&lt;BR /&gt;Caused
 by: sun.security.validator.ValidatorException: PKIX path building 
failed: sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target&lt;BR /&gt;   at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)&lt;BR /&gt;   at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)&lt;BR /&gt;   at sun.security.validator.Validator.validate(Validator.java:260)&lt;BR /&gt;   at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)&lt;BR /&gt;   at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)&lt;BR /&gt;   at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)&lt;BR /&gt;   at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496)&lt;BR /&gt;   ... 25 more&lt;BR /&gt;Caused
 by: sun.security.provider.certpath.SunCertPathBuilderException: unable 
to find valid certification path to requested target&lt;BR /&gt;   at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)&lt;BR /&gt;   at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)&lt;BR /&gt;   at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)&lt;BR /&gt;   at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)&lt;BR /&gt;   ... 31 more&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 21:51:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-you-use-webhdfs-in-Java-through-Knox/m-p/159513#M121902</guid>
      <dc:creator>rambanda</dc:creator>
      <dc:date>2018-12-03T21:51:32Z</dc:date>
    </item>
  </channel>
</rss>

