mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-198 Updated interpreter documentation.
This commit is contained in:
parent
b505391326
commit
227b815ed3
2 changed files with 26 additions and 10 deletions
|
|
@ -5,34 +5,50 @@ description: ""
|
|||
group: manual
|
||||
---
|
||||
{% include JB/setup %}
|
||||
|
||||
.add(HDFS_USER, "hdfs", "The WebHDFS user")
|
||||
.add(HDFS_MAXLENGTH, "1000", "Maximum number of lines of results fetched").build());
|
||||
|
||||
## HDFS File Interpreter for Apache Zeppelin
|
||||
|
||||
<br/>
|
||||
[Hadoop File System](http://hadoop.apache.org/) is a distributed, fault tolerant file system part of the hadoop project and is often used as storage for distributed processing engines like [Hadoop MapReduce](http://hadoop.apache.org/) and [Apache Spark](http://spark.apache.org/) or underlying file systems like [Alluxio](http://www.alluxio.org/).
|
||||
|
||||
## Configuration
|
||||
<table class="table-configuration">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Class</th>
|
||||
<th>Property</th>
|
||||
<th>Default</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>%hdfs</td>
|
||||
<td>HDFSFileInterpreter</td>
|
||||
<td>Provides File System commands for HDFS</td>
|
||||
<td>hdfs.url</td>
|
||||
<td>http://localhost:50070/webhdfs/v1/</td>
|
||||
<td>The URL for WebHDFS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hdfs.user</td>
|
||||
<td>hdfs</td>
|
||||
<td>The WebHDFS user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hdfs.maxlength</td>
|
||||
<td>1000</td>
|
||||
<td>Maximum number of lines of results fetched</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
This interpreter connects to HDFS using the HTTP WebHDFS interface.
|
||||
It supports the basic shell file commands applied to HDFS, it currently only supports browsing
|
||||
* You can use <i>ls [PATH]</i> and <i>ls -l [PATH]</i> to list a directory. If the path is missing, then the current directory is listed.
|
||||
* You can use <i>ls [PATH]</i> and <i>ls -l [PATH]</i> to list a directory. If the path is missing, then the current directory is listed. <i>ls </i> supports a <i>-h</h> flag for human readable file sizes.
|
||||
* You can use <i>cd [PATH]</i> to change your current directory by giving a relative or an absolute path.
|
||||
* You can invoke <i>pwd</i> to see your current directory.
|
||||
|
||||
> **Tip :** Use ( Ctrl + . ) for autocompletion.
|
||||
|
||||
### Create Interpreter
|
||||
|
||||
You can create the HDFS browser by pointing it to the WebHDFS interface of your Hadoop cluster.
|
||||
In a notebook, to enable the **HDFS** interpreter, click the **Gear** icon and select **HDFS**.
|
||||
|
||||
|
||||
### Configuration
|
||||
You can modify the configuration of HDFS from the `Interpreter` section. The HDFS interpreter express the following properties:
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ public class HDFSFileInterpreter extends FileInterpreter {
|
|||
|
||||
|
||||
// last word will contain the path we're working with.
|
||||
String lastToken= buf.substring(buf.lastIndexOf(" ") + 1);
|
||||
String lastToken = buf.substring(buf.lastIndexOf(" ") + 1);
|
||||
if (lastToken.startsWith("-")) { //flag not path
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue