適用於 Node.js 的 Azure HDInsight 模組Azure HDInsight Modules for Node.js

Azure HDInsight 是 Hortonworks Data Platform (HDP) 中 Hadoop 元件的雲端發佈。Azure HDInsight is a cloud distribution of the Hadoop components from the Hortonworks Data Platform (HDP). Apache Hadoop 是原始的開放原始碼建構,用於分散式處理和分析電腦叢集上的巨量資料集。Apache Hadoop was the original open-source framework for distributed processing and analysis of big data sets on clusters of computers.

HDInsight 透過下列方式讓 Hadoop 技術更容易使用︰HDInsight makes Hadoop technologies easier to use, with:

  • 較少的安裝和設定。Less setup and configuration. 請參閱「在 HDInsight 中佈建 Hadoop 叢集」。See Provision Hadoop clusters in HDInsight.
  • 高可用性和可靠性。High availability and reliability. 請參閱「HDInsight 可用性和可靠性」。See HDInsight availability and reliability.
  • 透過與 Active Directory 整合提供安全性和治理。Security and governance through integration with Active Directory. 請參閱「已加入網域的叢集」。See Domain-joined clusters.
  • 不需中斷作業的動態調整Dynamic scaling without interrupting jobs
  • 元件更新和目前版本。Component updates and current versions. 請參閱「HDInsight 上的 Hadoop 元件和版本」。See Hadoop components and versions on HDInsight.
  • 與其他 Azure 服務整合,包括 Web 應用程式和 SQL DatabaseIntegration with other Azure services, including Web apps and SQL Database

Hadoop 技術堆疊包含相關的軟體和公用程式,其中包括 Apache Hive、HBase、Spark、Kafka 和其他許多軟體。The Hadoop technology stack includes related software and utilities, including Apache Hive, HBase, Spark, Kafka, and many others.

管理封裝Management package

安裝 npm 模組Install the npm modules

使用 npm 來安裝適用於 Node.js 的 Azure HDInsight 模組Use npm to install the Azure HDInsight modules for Node.js

npm install azure-arm-hdinsight
azure-arm-hdinsight-jobs

範例Example

此範例會建立 HD Insight 用戶端,並列出所有可用的叢集。This example creates an HD Insight client and then lists all of the available clusters.

const msRestAzure = require('ms-rest-azure');
const HDInsightManagementClient = require('azure-arm-hdinsight');

const subscriptionId = 'my-subscription-id';

msRestAzure.interactiveLogin().then(credentials => {
    const client = HDInsightManagementClient.createHDInsightManagementClient(
        credentials
    );

    credentials.subscriptionId = subscriptionId;

    client.clusters.list((err, result) => {
        console.log(result);
    });
});

範例Samples

深入探索可在應用程式中使用的 Node.js 程式碼範例Explore more sample Node.js code you can use in your apps.