Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to get started with zeppelin

Shulou Source: shulou.com Published: 2022-05-31 14:32:48 11月07日 Update

How to get started with zeppelin? in view of this question, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

Display System

Text

Text content is output in Scala language by default

Shell

Html

Scala output html

Shell output html

Table

Scala

Shell

Table

Scala:

Shell:

Html:

Manual

Dynamic table

Use a form template

Text input format:

Use the formName template and use {formName=defaultValue} to provide default values

Drop-down selection form

${formName=defaultValue,option1 | option2... }

KMurv format, ${formName=defaultValue

Option1 (DisplayName) | option2 (DisplayName) … }

Dynamic programming

Z is a ZeppelinContext object

Text input format

Text input format with default values

Drop-down selection form

Notebook as Homepage

This part is not very heavy, just look at this link, http://zeppelin.incubator.apache.org/docs/manual/notebookashomepage.html

Interpreter

Spark, http://zeppelin.incubator.apache.org/docs/interpreter/spark.html

Hive

Md

Sh

Flink

And so on

It's all about how to use it.

Tutorial with Local File

Data Refine

Download requires bank data, http://archive.ics.uci.edu/ml/machine-learning-databases/00222/bank.zip

First, convert the csv format data to the Bank object RDD, and filter the header column

Val bankText = sc.textFile ("/ home/cluster/data/test/bank/bank-full.csv") case class Bank (age:Integer, job:String, marital: String, education: String, balance: Integer) val bank = bankText.map (s = > s.split (" ) .filter (s = > s (0)! = "\" age\ ") .map (s = > Bank (s (0). ToInt, s (1). ReplaceAll ("\ ","), s (2). ReplaceAll ("\", "), s (3). ReplaceAll ("\ ","), s (5). ReplaceAll ("\") ") .toInt) / / Below line works only in spark 1.3.0.instead.bank.toDF / For spark 1.1.x and spark 1.2.x use bank.registerTempTable (" bank ") instead.bank.toDF () .registerTempTable (" bank ") 1234567891011121314151617

Data Retrieval

Suppose we want to see age distribution from bank. To do this, run:

Execute the following statement to see the distribution of age:

% sql select age, count (1) from bank where age

< 30 group by age order by age1 动态输入maxAge参数(默认是30岁): %sql select age, count(1) from bank where age < ${maxAge=30} group by age order by age1

View the age distribution based on the marital status options:

% sql select age, count (1) from bank where marital= "${marital=single,single | divorced | married}" group by age order by age1

Zeppelin works much like Spark's Thrift Server by submitting an application (Application) to Spark, and then each query corresponds to a stage.

Therefore, before starting Zeppelin, you can configure the soon-to-be-launched Spark driver by configuring the environment variable ZEPPELIN_JAVA_OPTS, such as "- Dspark.executor.memory=6g-Dspark.cores.max=32".

This is the answer to the question on how to get started with zeppelin. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Tags: Format table input dynamic text question output content object age data more template status drop-down help solution selection configuration easy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MySQL Linux OPPO Reno Apple