繁体   English   中英

如何在 Azure HDInsight 群集中创建 Pig Latin 作业

[英]How to Create a Pig Latin Job in Azure HDInsight Cluster

我刚刚为 Azure 创建了一个免费帐户,并在 HDInsight 上创建了一个 hadoop 集群。 但是,它无论如何都没有显示如何启动 Pig 客户端并创建 Pig latin 作业并运行它?

不幸的是,您不能使用 Ambari UI 来运行猪拉丁作业。

注意:要使用 Pig 处理数据,需要打开连接到集群的 SSH 控制台,然后使用本地模式或 mapreduce 模式运行 pig latin:

如果您使用的是 Windows 客户端计算机:

  1. In the Microsoft Azure portal, on the HDInsight Cluster blade for your HDInsight cluster, click Secure Shell, and then in the Secure Shell blade, in the Hostname list, note the Host name for your cluster (which should be your_cluster_name-ssh.azurehdinsight.网)。

  2. 打开 PuTTY,在 Session 页面的 Host Name 框中输入主机名。 然后在连接类型下,select SSH 并单击打开。 如果显示无法验证主机证书的安全警告,请单击“是”继续。

  3. 出现提示时,输入您在配置集群时指定的 SSH 用户名和密码(不是集群登录用户名)。

如果您使用的是 Mac OS X 或 Linux 客户端计算机:

  1. In the Microsoft Azure portal, on the HDInsight Cluster blade for your HDInsight cluster, click Secure Shell, and then in the Secure Shell blade, in the Hostname list, select the hostname for your cluster. 然后复制显示的 ssh 命令,该命令应类似于以下命令 - 您将使用它连接到头节点。 ssh sshuser@your_cluster_name-ssh.azurehdinsight.net

  2. 打开一个新的终端 session,粘贴 ssh 命令,指定您的 SSH 用户名(不是集群登录用户名)。

  3. 如果即使无法验证证书也提示您连接,请输入 yes。

  4. 出现提示时,输入 SSH 用户名的密码。

连接到集群后, 运行 pig latin ,如下所示:

在此处输入图像描述

您可以执行 Pig Latin 语句:

  • 使用 grunt shell 或命令行
  • 在 mapreduce 模式或本地模式下
  • 交互式或批量

参考:猪手册

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM