|
|
@@ -21,15 +21,268 @@ analyzes without losing any context.
|
|
|
Each app of Hue can be extended to support your own languages or apps.
|
|
|
|
|
|
### Interface
|
|
|
-
|
|
|
#### Top search
|
|
|
#### Left assist
|
|
|
#### Right assist
|
|
|
#### Sample popup
|
|
|
#### Charting
|
|
|
-
|
|
|
The SDK will be clarified in the upcoming charting revamp.
|
|
|
|
|
|
+### Admin
|
|
|
+Quick Start Wizard
|
|
|
+------------------
|
|
|
+
|
|
|
+The Quick Start wizard allows you to perform the following Hue setup
|
|
|
+operations by clicking the tab of each step or sequentially by clicking
|
|
|
+Next in each screen:
|
|
|
+
|
|
|
+1. **Check Configuration** validates your Hue configuration. It will
|
|
|
+ note any potential misconfiguration and provide hints as to how to
|
|
|
+ fix them. You can edit the configuration file described in the next
|
|
|
+ section or use Cloudera Manager, if installed, to manage your
|
|
|
+ changes.
|
|
|
+2. **Examples** contains links to install examples into the Hive,
|
|
|
+ Impala, MapReduce, Spark, Oozie, Solr Dashboard and Pig Editor applications.
|
|
|
+3. **Users** contains a link to the User Admin application to create or
|
|
|
+ import users and a checkbox to enable and disable collection of
|
|
|
+ usage information.
|
|
|
+4. **Go!** - displays the Hue home screen, which contains links to the
|
|
|
+ different categories of applications supported by Hue: Query,
|
|
|
+ Hadoop, and Workflow.
|
|
|
+
|
|
|
+Configuration
|
|
|
+-------------
|
|
|
+
|
|
|
+Displays a list of the installed Hue applications and their
|
|
|
+configuration. The location of the folder containing the Hue
|
|
|
+configuration files is shown at the top of the page. Hue configuration
|
|
|
+settings are in the hue.ini configuration file.
|
|
|
+
|
|
|
+Click the tabs under **Configuration Sections and Variables** to see the
|
|
|
+settings configured for each application. For information on configuring
|
|
|
+these settings, see Hue Configuration in the Hue installation manual.
|
|
|
+
|
|
|
+Server Logs
|
|
|
+-----------
|
|
|
+
|
|
|
+Displays the Hue Server log and allows you to download the log to your
|
|
|
+local system in a zip file.
|
|
|
+
|
|
|
+
|
|
|
+<link rel="stylesheet" href="docbook.css" type="text/css" media="screen" title="no title" charset="utf-8"></link>
|
|
|
+
|
|
|
+User Admin
|
|
|
+==========
|
|
|
+
|
|
|
+The User Admin application lets a superuser add, delete, and manage Hue
|
|
|
+users and groups, and configure group permissions. Superusers can add
|
|
|
+users and groups individually, or import them from an LDAP directory.
|
|
|
+Group permissions define the Hue applications visible to group members
|
|
|
+when they log into Hue and the application features available to them.
|
|
|
+
|
|
|
+Starting User Admin
|
|
|
+-------------------
|
|
|
+
|
|
|
+Click the **User Admin** icon ()
|
|
|
+in the navigation bar at the top of the Hue browser page. The Hue Users
|
|
|
+page opens.
|
|
|
+
|
|
|
+Users
|
|
|
+-----
|
|
|
+
|
|
|
+The User Admin application provides two levels of user privileges:
|
|
|
+superusers and users.
|
|
|
+
|
|
|
+- Superusers — The first user who logs into Hue after its initial
|
|
|
+ installation becomes the first superuser. Superusers have
|
|
|
+ permissions to perform administrative functions:
|
|
|
+ - Add and delete users
|
|
|
+ - Add and delete groups
|
|
|
+ - Assign permissions to groups
|
|
|
+ - Change a user into a superuser
|
|
|
+ - Import users and groups from an LDAP server
|
|
|
+
|
|
|
+- Users — can change their name, e-mail address, and password and log
|
|
|
+ in to Hue and run Hue applications, subject to the permissions
|
|
|
+ provided by the Hue groups to which they belong.
|
|
|
+
|
|
|
+### Adding a User
|
|
|
+
|
|
|
+1. In the **User Admin** page, click **Add User**.
|
|
|
+2. In the **Credentials** screen, add required information about the
|
|
|
+ user. Once you provide the required information you can click the
|
|
|
+ wizard step tabs to set other information.
|
|
|
+
|
|
|
+ <table>
|
|
|
+<tr><td>Username</td><td> A user name that contains only letters, numbers, and underscores;
|
|
|
+ blank spaces are not allowed and the name cannot begin with a
|
|
|
+ number. The user name is used to log into Hue and in file
|
|
|
+ permissions and job submissions. This is a required field.
|
|
|
+</td></tr>
|
|
|
+<tr><td>Password and Password confirmation</td><td> A password for the user. This is a required field.</td></tr>
|
|
|
+<tr><td>Create home directory</td><td> Indicate whether to create a directory named /user/username in HDFS.
|
|
|
+ For non-superusers, the user and group of the directory are
|
|
|
+ username. For superusers, the user and group are username and
|
|
|
+ supergroup.</td></tr></table>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+3. Click **Add User** to save the information you specified and close
|
|
|
+ the **Add User** wizard or click **Next**.
|
|
|
+4. In the **Names and Groups** screen, add optional information.
|
|
|
+
|
|
|
+<table>
|
|
|
+<tr><td>First name and Last name</td><td> The user's first and last name.
|
|
|
+</td></tr>
|
|
|
+<tr><td>E-mail address</td><td>The user's e-mail address. The e-mail address is used by the Job
|
|
|
+ Designer and Beeswax applications to send users an e-mail message
|
|
|
+ after certain actions have occurred. The Job Designer sends an
|
|
|
+ e-mail message after a job has completed. Beeswax sends a message
|
|
|
+ after a query has completed. If an e-mail address is not specified,
|
|
|
+ the application will not attempt to email the user.</td></tr>
|
|
|
+<tr><td>Groups</td><td> The groups to which the user belongs. By default, a user is assigned
|
|
|
+ to the **default** group, which allows access to all applications.
|
|
|
+ See [Permissions](#permissions).</td></tr></table>
|
|
|
+
|
|
|
+
|
|
|
+5. Click **Add User** to save the information you specified and close
|
|
|
+ the **Add User** wizard or click **Next**.
|
|
|
+6. In the **Advanced** screen, add status information.
|
|
|
+
|
|
|
+<table>
|
|
|
+<tr><td>Active</td><td> Indicate that the user is enabled and allowed to log in. Default: checked.</td></tr>
|
|
|
+<tr><td>Superuser status</td><td> Assign superuser privileges to the user.</td></tr></table>
|
|
|
+
|
|
|
+7. Click **Add User** to save the information you specified and close
|
|
|
+ the **Add User** wizard.
|
|
|
+
|
|
|
+### Deleting a User
|
|
|
+
|
|
|
+1. Check the checkbox next to the user name and click **Delete**.
|
|
|
+2. Click **Yes** to confirm.
|
|
|
+
|
|
|
+### Editing a User
|
|
|
+
|
|
|
+1. Click the user you want to edit in the **Hue Users** list.
|
|
|
+2. Make the changes to the user and then click **Update user**.
|
|
|
+
|
|
|
+### Importing Users from an LDAP Directory
|
|
|
+
|
|
|
+Hue must be configured to use an external LDAP directory (OpenLDAP or
|
|
|
+Active Directory). See Hue Installation in [CDH4
|
|
|
+Installation](http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Installation-Guide/CDH4-Installation-Guide.html).
|
|
|
+
|
|
|
+ **Note**:
|
|
|
+
|
|
|
+Importing users from an LDAP directory does not import any password
|
|
|
+information. You must add passwords manually in order for a user to log
|
|
|
+in.
|
|
|
+
|
|
|
+To add a user from an external LDAP directory:
|
|
|
+
|
|
|
+1. Click **Add/sync LDAP user**.
|
|
|
+2. Specify the user properties:
|
|
|
+
|
|
|
+<table>
|
|
|
+<tr><td>Username</td><td>The user name.</td></tr>
|
|
|
+<tr><td>Distinguished name</td><td>Indicate that Hue should use a full distinguished name for the user.
|
|
|
+ This imports the user's first and last name, username, and email,
|
|
|
+ but does not store the user password.</td></tr>
|
|
|
+ <tr><td>Create home directory</td><td> Indicate that Hue should create a home directory for the user in
|
|
|
+ HDFS.</td></tr></table>
|
|
|
+
|
|
|
+
|
|
|
+3. Click **Add/sync user**.
|
|
|
+
|
|
|
+ If the user already exists in the User Admin, the user information
|
|
|
+ in User Admin is synced with what is currently in the LDAP
|
|
|
+ directory.
|
|
|
+
|
|
|
+### Syncing Users and Groups with an LDAP Directory
|
|
|
+
|
|
|
+You can sync the Hue user database with the current state of the LDAP
|
|
|
+directory using the **Sync LDAP users/groups** function. This updates
|
|
|
+the user and group information for the already imported users and
|
|
|
+groups. It does not import any new users or groups.
|
|
|
+
|
|
|
+1. Click **Sync LDAP users/groups**.
|
|
|
+2. The **Create Home Directories** checkbox creates home directories in
|
|
|
+ HDFS for existing imported members that don't have home directories.
|
|
|
+3. In the **Sync LDAP users and groups** dialog, click **Sync** to
|
|
|
+ perform the sync.
|
|
|
+
|
|
|
+Groups
|
|
|
+------
|
|
|
+
|
|
|
+Superusers can add and delete groups, configure group permissions, and
|
|
|
+assign users to group memberships.
|
|
|
+
|
|
|
+### Adding a Group
|
|
|
+
|
|
|
+You can add groups, and delete the groups you've added. You can also
|
|
|
+import groups from an LDAP directory.
|
|
|
+
|
|
|
+1. In the **User Admin** window, click **Groups** and then click **Add
|
|
|
+ Group**.
|
|
|
+2. Specify the group properties:
|
|
|
+
|
|
|
+<table>
|
|
|
+<tr><td>Name</td><td> The name of the group. Group names can only be letters, numbers, and
|
|
|
+ underscores; blank spaces are not allowed.</td></tr>
|
|
|
+<tr><td>Members</td><td>The users in the group. Check user names or check Select all.</td></tr>
|
|
|
+ <tr><td>Permissions</td><td>The applications the users in the group can access. Check
|
|
|
+ application names or check Select all.</td></tr></table>
|
|
|
+
|
|
|
+3. Click **Add group**.
|
|
|
+
|
|
|
+### Adding Users to a Group
|
|
|
+
|
|
|
+1. In the **User Admin** window, click **Groups**.
|
|
|
+2. Click the group.
|
|
|
+3. To add users to the group, check the names in the list provided or
|
|
|
+ check **Select All**.
|
|
|
+4. Click **Update group**.
|
|
|
+
|
|
|
+### Deleting a Group
|
|
|
+
|
|
|
+1. Click **Groups**.
|
|
|
+2. Check the checkbox next to the group and click **Delete**.
|
|
|
+3. Click **Yes** to confirm.
|
|
|
+
|
|
|
+### Importing Groups from an LDAP Directory
|
|
|
+
|
|
|
+1. From the **Groups** tab, click **Add/sync LDAP group**.
|
|
|
+2. Specify the group properties:
|
|
|
+
|
|
|
+<table>
|
|
|
+<tr><td>Name</td><td> The name of the group.</td></tr>
|
|
|
+<tr><td>Distinguished name</td><td> Indicate that Hue should use a full distinguished name for the
|
|
|
+ group.</td></tr>
|
|
|
+ <tr><td>Import new members</td><td> Indicate that Hue should import the members of the group.</td></tr>
|
|
|
+ <tr><td>Import new members from all subgroups</td><td>
|
|
|
+ Indicate that Hue should import the members of the subgroups.</td></tr>
|
|
|
+ <tr><td>Create home directories</td><td> Indicate that Hue should create home directories in HDFS for the
|
|
|
+ imported members.</td></tr></table>
|
|
|
+
|
|
|
+3. Click **Add/sync group**.
|
|
|
+
|
|
|
+<a id="permissions"></a>
|
|
|
+Permissions
|
|
|
+-----------
|
|
|
+
|
|
|
+Permissions for Hue applications are granted to groups, with users
|
|
|
+gaining permissions based on their group membership. Group permissions
|
|
|
+define the Hue applications visible to group members when they log into
|
|
|
+Hue and the application features available to them.
|
|
|
+
|
|
|
+1. Click **Permissions**.
|
|
|
+2. Click the application for which you want to assign permissions.
|
|
|
+3. Check the checkboxes next to the groups you want to have permission
|
|
|
+ for the application. Check **Select all** to select all groups.
|
|
|
+4. Click **Update permission**. The new groups will appear in the
|
|
|
+ Groups column in the **Hue Permissions** list.
|
|
|
+
|
|
|
+
|
|
|
### Importer
|
|
|
|
|
|
### Documents
|
|
|
@@ -42,6 +295,147 @@ The goal of Hue’s Editor is to make data querying easy and productive.
|
|
|
It focuses on SQL but also supports job submissions. It comes with an intelligent autocomplete, search & tagging of data and query assistance.
|
|
|
|
|
|
#### Languages
|
|
|
+#### Hive
|
|
|
+Beeswax
|
|
|
+=======
|
|
|
+
|
|
|
+The Beeswax application enables you to perform queries on Apache Hive, a
|
|
|
+data warehousing system designed to work with Hadoop. For information
|
|
|
+about Hive, see [Hive
|
|
|
+Documentation](http://archive.cloudera.com/cdh4/cdh/4/hive/). You can
|
|
|
+create Hive databases, tables and partitions, load data, create, run,
|
|
|
+and manage queries, and download the results in a Microsoft Office Excel
|
|
|
+worksheet file or a comma-separated values file.
|
|
|
+
|
|
|
+Beeswax and Hive Installation and Configuration
|
|
|
+-----------------------------------------------
|
|
|
+
|
|
|
+Beeswax is installed and configured as part of Hue. For information
|
|
|
+about installing and configuring Hue, see the Hue Installation
|
|
|
+manual.
|
|
|
+
|
|
|
+Beeswax assumes an existing Hive installation. The Hue installation
|
|
|
+instructions include the configuration necessary for Beeswax to access
|
|
|
+Hive. You can view the current Hive configuration from the **Settings**
|
|
|
+tab in the Beeswax application.
|
|
|
+
|
|
|
+By default, a Beeswax user can see the saved queries for all users -
|
|
|
+both his/her own queries and those of other Beeswax users. To restrict
|
|
|
+viewing saved queries to the query owner and Hue administrators, set the
|
|
|
+share\_saved\_queries property under the [beeswax] section in the Hue
|
|
|
+configuration file to false.
|
|
|
+
|
|
|
+### Running Queries
|
|
|
+
|
|
|
+ **Note**: To run a query, you must be logged
|
|
|
+in to Hue as a user that also has a Unix user account on the remote
|
|
|
+server.
|
|
|
+
|
|
|
+1. To execute a portion of the query, highlight one or more query
|
|
|
+ statements.
|
|
|
+2. Click **Execute**. The Query Results window appears with the results
|
|
|
+ of your query.
|
|
|
+ - To view a log of the query execution, click **Log** at the top
|
|
|
+ of the results display. You can use the information in this tab
|
|
|
+ to debug your query.
|
|
|
+ - To view the query that generated these results, click **Query**
|
|
|
+ at the top of the results display.
|
|
|
+ - To view the columns of the query, click **Columns**.
|
|
|
+ - To return to the query in the Query Editor, click **Unsaved
|
|
|
+ Query**.
|
|
|
+
|
|
|
+3. If there are multiple statements in the query, click Next in the
|
|
|
+ Multi-statement query pane to execute the remaining statements.
|
|
|
+
|
|
|
+ **Note**: Under **MR JOBS**, you can view any
|
|
|
+MapReduce jobs that the query generated.
|
|
|
+
|
|
|
+### Downloading and Saving Query Results
|
|
|
+
|
|
|
+ **Important**:
|
|
|
+
|
|
|
+- You can only save results to a file when the results were generated
|
|
|
+ by a MapReduce job.
|
|
|
+- This is the preferred way to save when the result is large (for
|
|
|
+ example \> 1M rows).
|
|
|
+
|
|
|
+1. Do any of the following to download or save the query results:
|
|
|
+ - Click **Download as CSV** to download the results in a
|
|
|
+ comma-separated values file suitable for use in other
|
|
|
+ applications.
|
|
|
+ - Click **Download as XLS** to download the results in a Microsoft
|
|
|
+ Office Excel worksheet file.
|
|
|
+ - Click **Save** to save the results in a table or HDFS file.
|
|
|
+ - To save the results in a new table, select **In a new
|
|
|
+ table**, enter a table name, and then click **Save**.
|
|
|
+ - To save the results in an HDFS file, select **In an HDFS
|
|
|
+ directory**, enter a path and then click **Save**. You can
|
|
|
+ then download the file with [File Browser](../filebrowser.html).
|
|
|
+
|
|
|
+<a id="advancedQuerySettings"></a>
|
|
|
+### Advanced Query Settings
|
|
|
+
|
|
|
+The pane to the left of the Query Editor lets you specify the following
|
|
|
+options:
|
|
|
+
|
|
|
+
|
|
|
+<table>
|
|
|
+<tr><td>DATABASE</td><td>The database containing the table definitions.</td></tr>
|
|
|
+<tr><td>SETTINGS</td><td>Override the Hive and Hadoop default settings. To configure a new
|
|
|
+setting:
|
|
|
+
|
|
|
+<ol>
|
|
|
+<li> Click Add.
|
|
|
+<li> For Key, enter a Hive or Hadoop configuration variable name.
|
|
|
+<li> For Value, enter the value you want to use for the variable.
|
|
|
+
|
|
|
+For example, to override the directory where structured Hive query logs
|
|
|
+are created, you would enter hive.querylog.location for Key, and a
|
|
|
+path for Value.
|
|
|
+</ol>
|
|
|
+
|
|
|
+To view the default settings, click the Settings tab at the top of
|
|
|
+the page. For information about Hive configuration variables, see:
|
|
|
+[http://wiki.apache.org/hadoop/Hive/AdminManual/Configuration](http://wiki.apache.org/hadoop/Hive/AdminManual/Configuration).
|
|
|
+For information about Hadoop configuration variables, see:
|
|
|
+[http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml](http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml).</td></tr>
|
|
|
+<tr><td>FILE RESOURCES</td><td>Make files locally accessible at query execution time available on the
|
|
|
+Hadoop cluster. Hive uses the Hadoop Distributed Cache to distribute the
|
|
|
+added files to all machines in the cluster at query execution time.
|
|
|
+
|
|
|
+<ol>
|
|
|
+<li> Click Add to configure a new setting.
|
|
|
+<li> From the Type drop-down menu, choose one of the following:
|
|
|
+<ul>
|
|
|
+ <li>jar - Adds the specified resources to the Java classpath.
|
|
|
+ <li>archive - Unarchives the specified resources when
|
|
|
+ distributing them.
|
|
|
+ <li>file - Adds the specified resources to the distributed
|
|
|
+ cache. Typically, this might be a transform script (or similar)
|
|
|
+ to be executed.
|
|
|
+
|
|
|
+<li> For Path, enter the path to the file or click
|
|
|
+  to browse and select the file.
|
|
|
+</ol>
|
|
|
+
|
|
|
+ Note: It is not necessary to specify files
|
|
|
+used in a transform script if the files are available in the same path
|
|
|
+on all machines in the Hadoop cluster.</td></tr>
|
|
|
+<tr><td>USER-DEFINED FUNCTIONS</td><td>Specify user-defined functions. Click Add to configure a new
|
|
|
+setting. Specify the function name in the Name field, and specify
|
|
|
+the class name for Classname.
|
|
|
+
|
|
|
+You *must* specify a JAR file for the user-defined functions in FILE RESOURCES.
|
|
|
+
|
|
|
+To include a user-defined function in a query, add a $ (dollar sign)
|
|
|
+before the function name in the query. For example, if MyTable is a
|
|
|
+user-defined function name in the query, you would type: SELECT $MyTable
|
|
|
+</td></tr>
|
|
|
+<tr><td>PARAMETERIZATION</td><td>Indicate that a dialog box should display to enter parameter values when
|
|
|
+a query containing the string $parametername is executed. Enabled by
|
|
|
+default.</td></tr>
|
|
|
+</table>
|
|
|
+
|
|
|
#### Autocomplete
|
|
|
#### Syntax checker
|
|
|
#### Query Assist
|