logo资料库

HUE用户手册.pdf

第1页 / 共53页
第2页 / 共53页
第3页 / 共53页
第4页 / 共53页
第5页 / 共53页
第6页 / 共53页
第7页 / 共53页
第8页 / 共53页
资料共53页,剩余部分请下载后查看
cloudera.github.iohttp://cloudera.github.io/hue/docs-3.7.0/user-guide/index.htmlHue User GuideIntroducing HueAbout HueBeeswax Hive EditorImpala Query UIPig EditorFile BrowserMetastore ManagerSqoop UIJob BrowserJob DesignerOozie Editor and DashboardSolr SearchZooKeeper BrowserHBase BrowserUser Admin
cloudera.github.iohttp://cloudera.github.io/hue/docs-3.7.0/user-guide/introducing.htmlIntroducing HueHue is a set of web applications that enable you to interact with a Hadoop cluster. Hue applications let you browseHDFS and jobs, manage a Hive metastore, run Hive, Cloudera Impala queries and Pig scripts, browse HBase,export data with Sqoop, submit MapReduce programs, build custom search engines with Solr, and schedulerepetitive workflows with Oozie.Hue ArchitectureHue applications run in a Web browser and require no client installation.The following figure illustrates how Hue works. Hue Server is a "container" web application that sits in betweenCDH and the browser. It hosts all the Hue web applications and communicates with CDH components.Starting ApplicationsTo open a Hue application, click the appropriate icon in thenavigation bar at the top of the Hue web browser window. Toopen a second application concurrently (or a secondinstance of the same application), right-click the icon andselect Open link in new tab.Displaying Help for the Hue ApplicationsTo display the help text for a Hue application, click the Help () tab in the Hue navigation bar, then click the appropriate link in the Help navigation bar at the top of theHelp window.Logging In and OutTo log out of Hue, click Sign Out from the pull-down list under the logged-in user name (at the right of the Huenavigation bar).Notice of MisconfigurationIf Hue detects a misconfiguration, an indicator appears in the navigation bar at the top of the page. Clickingthis indicator takes you to the Check Configuration screen which will indicate the potentialmisconfiguration(s) with hints about fixing them.Changing Your PasswordYou can go directly to your own information by selecting username > Profile at the right of the Hue navigation bar.If authentication is managed by Hue (that is, authentication is not managed via some external mechanism), andyou are a superuser, you can use the User Admin application to change password and personal details.Seeking Help, Reporting Bugs, and Providing FeedbackThe Hue team strongly values your feedback. The best way to contact us is to send email to hue-user@cloudera.org.If you're experiencing transient errors (typically an error message saying a service is down), contact your system
administrator first.
cloudera.github.iohttp://cloudera.github.io/hue/docs-3.7.0/user-guide/about.htmlAbout HueThe About Hue application displays the version of Hue you are running. If you are a superuser, it lets youperform Hue setup tasks, and lets you view configuration and logs.Starting About HueTo start the About Hue application, click in the navigation bar at the top of the Hue browser page. It opensto the Quick Start Wizard screen.Quick Start WizardThe Quick Start wizard allows you to perform the following Hue setup operations by clicking the tab of each stepor sequentially by clicking Next in each screen:1. Check Configuration validates your Hue configuration. It will note any potential misconfiguration andprovide hints as to how to fix them. You can edit the configuration file described in the next section or useCloudera Manager, if installed, to manage your changes.2. Examples contains links to install examples into the Beeswax, Cloudera Impala, Metastore Manager, JobDesigner, Oozie Editor/Dashboard, and Pig Editor applications.3. Users contains a link to the User Admin application to create or import users and a checkbox to enableand disable collection of usage information.4. Go! - displays the Hue home screen, which contains links to the different categories of applicationssupported by Hue: Query, Hadoop, and Workflow.ConfigurationDisplays a list of the installed Hue applications and their configuration. The location of the folder containing theHue configuration files is shown at the top of the page. Hue configuration settings are in the hue.ini configurationfile.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 LogsDisplays the Hue Server log and allows you to download the log to your local system in a zip file.
cloudera.github.iohttp://cloudera.github.io/hue/docs-3.7.0/user-guide/beeswax.htmlBeeswaxThe Beeswax application enables you to perform queries on Apache Hive, a data warehousing system designedto work with Hadoop. For information about Hive, see Hive Documentation. You can create Hive databases,tables and partitions, load data, create, run, and manage queries, and download the results in a Microsoft OfficeExcel worksheet file or a comma-separated values file.Beeswax and Hive Installation and ConfigurationBeeswax is installed and configured as part of Hue. For information about installing and configuring Hue, see theHue Installation manual.Beeswax assumes an existing Hive installation. The Hue installation instructions include the configurationnecessary for Beeswax to access Hive. You can view the current Hive configuration from the Settings tab in theBeeswax application.By default, a Beeswax user can see the saved queries for all users - both his/her own queries and those of otherBeeswax users. To restrict viewing saved queries to the query owner and Hue administrators, set theshare_saved_queries property under the [beeswax] section in the Hue configuration file to false.Starting BeeswaxClick the Beeswax icon () in the navigation bar at the top of the Hue browser page.Managing Databases, Tables, and PartitionsYou can create databases, tables, partitions, and load data by executing Hive data manipulation statements inthe Beeswax application.You can also use the Metastore Manager application to manage the databases, tables, and partitions and loaddata.Installing Example Queries and TablesNote: You must be a superuser to perform this task.1. Click . The Quick Start Wizard opens.2. Click Step 2: Examples.3. Click Beeswax (Hive UI).Query EditorThe Query Editor view lets you create, save, and submit queries in the Hive Query Language (HQL), which issimilar to Structured Query Language (SQL). When you submit a query, the Beeswax Server uses Hive to run thequeries. You can either wait for the query to complete, or return later to find the queries in the History view. Youcan also request to receive an email message after the query is completed.In the box to the left of the Query field, you can select a database, override the default Hive and Hadoop settings,specify file resources and user-defined functions, enable users to enter parameters at run-time, and requestemail notification when the job is complete. See Advanced Query Settings for details on using these settings.
Creating Queries1. In the Query Editor window, type a query or multiple queries separated by a semicolon ";". To be presentedwith a drop-down of autocomplete options, type CTRL+spacebar when entering a query.2. To save your query and advanced settings to use again later, click Save As, enter a name and description,and then click OK. To save changes to an existing query, click Save.3. If you want to view the execution plan for the query, click Explain. For more information, seehttp://wiki.apache.org/hadoop/Hive/LanguageManual/Explain.Loading Queries into the Query Editor1. Click the My Queries tab.1. Click the Recent Saved Queries or Recent Run Queries tab to display the respective queries.Do one of the following:Click the Saved Queries tab.2. Click a query name. The query is loaded into the Query Editor.Running QueriesNote: To run a query, you must be logged in to Hue as a user that also has a Unix user account on theremote 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 theinformation 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 theremaining statements.Note: Under MR JOBS, you can view any MapReduce jobs that the query generated.Downloading and Saving Query ResultsImportant: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).
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 usein 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 clickSave.To save the results in an HDFS file, select In an HDFS directory, enter a path and then clickSave. You can then download the file with File Browser.Advanced Query SettingsThe pane to the left of the Query Editor lets you specify the following options:DATABASEThe database containing the table definitions.SETTINGSOverride the Hive and Hadoop default settings. To configure a new setting:1. Click Add.2. For Key, enter a Hive or Hadoop configuration variable name.3. For Value, enter the value you want to use for the variable. For example, tooverride the directory where structured Hive query logs are created, you wouldenter hive.querylog.location for Key, and a path for Value.To view the default settings, click the Settings tab at the top of the page. Forinformation about Hive configuration variables, see:[http://wiki.apache.org/hadoop/Hive/AdminManual/Configuration](http://wiki.apache.org/hadoop/Hive/AdminManual/Configuration). For informationabout 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).FILE RESOURCESMake 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 machinesin the cluster at query execution time.1. Click Add to configure a new setting.2. From the Type drop-down menu, choose one of the following:jar - Adds the specified resources to the Java classpath.archive - Unarchives the specified resources when distributing them.file - Adds the specified resources to the distributed cache. Typically, thismight be a transform script (or similar) to be executed.For Path, enter the path to the file or click ![image](images/browse.png)to browse and select the file.![image](images/note.jpg) Note: It is not necessary to specify files used in a transformscript if the files are available in the same path on all machines in the Hadoop cluster.
USER-DEFINEDFUNCTIONSSpecify user-defined functions. Click Add to configure a new setting. Specify thefunction 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. Toinclude a user-defined function in a query, add a $ (dollar sign) before the functionname in the query. For example, if MyTable is a user-defined function name in thequery, you would type: SELECT $MyTablePARAMETERIZATIONIndicate that a dialog box should display to enter parameter values when a querycontaining the string $parametername is executed. Enabled by default.EMAILNOTIFICATIONIndicate that an email message should be sent after a query completes. The email issent to the email address specified in the logged-in user's profile.Viewing Query HistoryYou can view the history of queries that you have run previously. Results for these queries are available for oneweek or until Hue is restarted.1. Click History. A list of your saved and unsaved queries displays in the Query History window.2. To display the queries for all users, click Show everyone's queries. To display your queries only, clickShow my queries.3. To display the automatically generated actions performed on a user's behalf, click Show auto actions. Todisplay user queries again, click Show user queries.Viewing, Editing, Copying, and Deleting Saved QueriesYou can view a list of saved queries of all users by clicking My Queries and then selecting either Recent SavedQueries or Recent Run Queries tab to display the respective queries or clicking Saved Queries. You can copyany query, but you can edit, delete, and view the history of only your own queries.Edit1. Click Saved Queries. The Queries window displays.2. Check the checkbox next to the query and click Edit. The query displays in the Query Editor window.3. Change the query and then click Save. You can also click Save As, enter a new name, and click OK tosave a copy of the query.Copy1. Click Saved Queries. The Queries window displays.2. Check the checkbox next to the query and click Copy. The query displays in the Query Editor window.3. Change the query as necessary and then click Save. You can also click Save As, enter a new name, andclick OK to save a copy of the query.Copy in Query History1. Click History. The Query History window displays.2. To display the queries for all users, click Show everyone's queries. The queries for all users display inthe History window.3. Click the query you want to copy. A copy of the query displays in the Query Editor window.4. Change the query, if necessary, and then click Save As, enter a new name, and click OK to save thequery.Delete
分享到:
收藏