From af239887b4f81026cad4adcea7d826222741600b Mon Sep 17 00:00:00 2001 From: Kirill Morozov Date: Fri, 26 Aug 2016 11:01:51 +0100 Subject: [PATCH] BIGTOP-2521: code fixed according require parser=future --- bigtop-deploy/puppet/README.md | 2 +- bigtop-deploy/puppet/manifests/site.pp | 2 - .../puppet/modules/alluxio/manifests/init.pp | 4 +- .../puppet/modules/flink/manifests/init.pp | 4 +- .../puppet/modules/hadoop/manifests/init.pp | 48 +++++++++---------- .../modules/hadoop_hbase/manifests/init.pp | 12 ++--- .../modules/hadoop_oozie/manifests/init.pp | 6 +-- .../modules/hadoop_pig/manifests/init.pp | 2 +- .../hadoop_zookeeper/manifests/init.pp | 4 +- .../puppet/modules/kafka/manifests/init.pp | 2 +- .../puppet/modules/qfs/manifests/init.pp | 14 +++--- .../puppet/modules/spark/manifests/init.pp | 28 +++++------ .../puppet/modules/zeppelin/manifests/init.pp | 2 +- 13 files changed, 64 insertions(+), 66 deletions(-) diff --git a/bigtop-deploy/puppet/README.md b/bigtop-deploy/puppet/README.md index 692c3952ef..8adc7b8889 100644 --- a/bigtop-deploy/puppet/README.md +++ b/bigtop-deploy/puppet/README.md @@ -142,7 +142,7 @@ bigtop::bigtop_repo_uri: "http://bigtop-repos.s3.amazonaws.com/releases/1.1.0/ub And finally execute ``` -puppet apply -d --modulepath="bigtop-deploy/puppet/modules:/etc/puppet/modules" bigtop-deploy/puppet/manifests/site.pp +puppet apply -d --parser future --modulepath="bigtop-deploy/puppet/modules:/etc/puppet/modules" bigtop-deploy/puppet/manifests ``` When ignite-hadoop accelerator is deployed the client configs are placed under `/etc/hadoop/ignite.client.conf`. All one needs to do to run Mapreduce jobs on ignite-hadoop grid diff --git a/bigtop-deploy/puppet/manifests/site.pp b/bigtop-deploy/puppet/manifests/site.pp index 4af8039fea..e6227f5463 100644 --- a/bigtop-deploy/puppet/manifests/site.pp +++ b/bigtop-deploy/puppet/manifests/site.pp @@ -68,8 +68,6 @@ noop => $jdk_preinstalled, } -import "cluster.pp" - node default { $roles_enabled = hiera("bigtop::roles_enabled", false) diff --git a/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp b/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp index 66151cade0..104133eacf 100644 --- a/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp @@ -41,7 +41,7 @@ } class master { - include common + include alluxio::common exec { "alluxio formatting": @@ -61,7 +61,7 @@ } class worker { - include common + include alluxio::common if ( $fqdn == $alluxio::common::master_host ) { notice("alluxio ---> master host") diff --git a/bigtop-deploy/puppet/modules/flink/manifests/init.pp b/bigtop-deploy/puppet/modules/flink/manifests/init.pp index ae79fe45d5..221d62dd28 100644 --- a/bigtop-deploy/puppet/modules/flink/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/flink/manifests/init.pp @@ -35,7 +35,7 @@ } class jobmanager { - include common + include flink::common service { "flink-jobmanager": ensure => running, @@ -49,7 +49,7 @@ } class taskmanager { - include common + include flink::common service { "flink-taskmanager": ensure => running, diff --git a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp index 430e3416de..69e26bb6ca 100644 --- a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp @@ -49,7 +49,7 @@ } if ("mapred-app" in $roles) { - include hadoop::mapred-app + include hadoop::mapred_app } if ("nodemanager" in $roles) { @@ -153,7 +153,7 @@ $kerberos_realm = $hadoop::kerberos_realm, ) inherits hadoop { - include common + include hadoop::common package { "hadoop-yarn": ensure => latest, @@ -234,7 +234,7 @@ $sshfence_keydir = "$hadoop_ha_sshfence_user_home/.ssh" $sshfence_keypath = "$sshfence_keydir/id_sshfence" - include common + include hadoop::common # Check if test mode is enforced, so we can install hdfs ssh-keys for passwordless if ($testonly_hdfs_sshkeys == "yes") { @@ -378,7 +378,7 @@ $hadoop_security_authentication = $hadoop::hadoop_security_authentication, $kerberos_realm = $hadoop::kerberos_realm, ) inherits hadoop { - include common_hdfs + include hadoop::common_hdfs package { "hadoop-mapreduce": ensure => latest, @@ -413,7 +413,7 @@ class datanode ( $hadoop_security_authentication = $hadoop::hadoop_security_authentication, ) inherits hadoop { - include common_hdfs + include hadoop::common_hdfs package { "hadoop-hdfs-datanode": ensure => latest, @@ -440,7 +440,7 @@ ensure => directory, owner => hdfs, group => hdfs, - mode => 755, + mode => '755', require => [ Package["hadoop-hdfs"] ], } } @@ -452,7 +452,7 @@ $hadoop_security_authentcation = $hadoop::hadoop_security_authentication, $kerberos_realm = $hadoop::kerberos_realm, ) inherits hadoop { - include common_hdfs + include hadoop::common_hdfs if ($hadoop_security_authentication == "kerberos") { kerberos::host_keytab { "httpfs": @@ -503,7 +503,7 @@ } class kinit { - include common_hdfs + include hadoop::common_hdfs exec { "HDFS kinit": command => "/usr/bin/kinit -kt /etc/hdfs.keytab hdfs/$fqdn && /usr/bin/kinit -R", @@ -551,7 +551,7 @@ $standby_bootstrap_retries = 10, # milliseconds $standby_bootstrap_retry_interval = 30000) { - include common_hdfs + include hadoop::common_hdfs if ($hadoop::common_hdfs::ha != 'disabled') { file { $hadoop::common_hdfs::sshfence_keydir: @@ -697,7 +697,7 @@ ensure => directory, owner => hdfs, group => hdfs, - mode => 700, + mode => '700', require => [Package["hadoop-hdfs"]], } } @@ -720,7 +720,7 @@ } class secondarynamenode { - include common_hdfs + include hadoop::common_hdfs package { "hadoop-hdfs-secondarynamenode": ensure => latest, @@ -743,7 +743,7 @@ } class journalnode { - include common_hdfs + include hadoop::common_hdfs package { "hadoop-hdfs-journalnode": ensure => latest, @@ -765,14 +765,14 @@ ensure => directory, owner => 'hdfs', group => 'hdfs', - mode => 755, + mode => '755', require => [Package["hadoop-hdfs"]], } } class resourcemanager { - include common_yarn + include hadoop::common_yarn package { "hadoop-yarn-resourcemanager": ensure => latest, @@ -790,7 +790,7 @@ } class proxyserver { - include common_yarn + include hadoop::common_yarn package { "hadoop-yarn-proxyserver": ensure => latest, @@ -808,7 +808,7 @@ } class historyserver { - include common_mapred_app + include hadoop::common_mapred_app package { "hadoop-mapreduce-historyserver": ensure => latest, @@ -827,8 +827,8 @@ class nodemanager { - include common_mapred_app - include common_yarn + include hadoop::common_mapred_app + include hadoop::common_yarn package { "hadoop-yarn-nodemanager": ensure => latest, @@ -849,27 +849,27 @@ ensure => directory, owner => yarn, group => yarn, - mode => 755, + mode => '755', require => [Package["hadoop-yarn"]], } } - class mapred-app { - include common_mapred_app + class mapred_app { + include hadoop::common_mapred_app hadoop::create_storage_dir { $hadoop::common_mapred_app::mapred_data_dirs: } -> file { $hadoop::common_mapred_app::mapred_data_dirs: ensure => directory, owner => yarn, group => yarn, - mode => 755, + mode => '755', require => [Package["hadoop-mapreduce"]], } } class client { - include common_mapred_app - include common_yarn + include hadoop::common_mapred_app + include hadoop::common_yarn $hadoop_client_packages = $operatingsystem ? { /(OracleLinux|CentOS|RedHat|Fedora)/ => [ "hadoop-doc", "hadoop-hdfs-fuse", "hadoop-client", "hadoop-libhdfs", "hadoop-debuginfo" ], diff --git a/bigtop-deploy/puppet/modules/hadoop_hbase/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop_hbase/manifests/init.pp index a168e341df..fb1de9682b 100644 --- a/bigtop-deploy/puppet/modules/hadoop_hbase/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hadoop_hbase/manifests/init.pp @@ -36,14 +36,14 @@ } } - class client-package { + class client_package { package { "hbase": ensure => latest, - } + } } class common_config ($rootdir, $zookeeper_quorum, $kerberos_realm = "", $heap_size="1024") { - include client-package + include hadoop_hbase::client_package if ($kerberos_realm) { require kerberos::client kerberos::host_keytab { "hbase": @@ -68,7 +68,7 @@ } class client($thrift = false) { - include common_config + include hadoop_hbase::common_config if ($thrift) { package { "hbase-thrift": @@ -87,7 +87,7 @@ } class server { - include common_config + include hadoop_hbase::common_config package { "hbase-regionserver": ensure => latest, @@ -104,7 +104,7 @@ } class master { - include common_config + include hadoop_hbase::common_config package { "hbase-master": ensure => latest, diff --git a/bigtop-deploy/puppet/modules/hadoop_oozie/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop_oozie/manifests/init.pp index 801008607f..7a3c62d2a5 100644 --- a/bigtop-deploy/puppet/modules/hadoop_oozie/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hadoop_oozie/manifests/init.pp @@ -17,15 +17,15 @@ class deploy ($roles) { if ("oozie-client" in $roles) { - include client + include hadoop_oozie::client } if ("oozie-server" in $roles) { include hadoop::init_hdfs - include server + include hadoop_oozie::server Class['Hadoop::Init_hdfs'] -> Class['Hadoop_oozie::Server'] if ("mapred-app" in $roles) { - Class['Hadoop::Mapred-app'] -> Class['Hadoop_oozie::Server'] + Class['Hadoop::Mapred_app'] -> Class['Hadoop_oozie::Server'] } } } diff --git a/bigtop-deploy/puppet/modules/hadoop_pig/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop_pig/manifests/init.pp index 9582ffd04d..49f871e544 100644 --- a/bigtop-deploy/puppet/modules/hadoop_pig/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hadoop_pig/manifests/init.pp @@ -17,7 +17,7 @@ class deploy ($roles) { if ("pig-client" in $roles) { - include client + include hadoop_pig::client } } diff --git a/bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp index 31a609e33c..5d3ee95cb6 100644 --- a/bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hadoop_zookeeper/manifests/init.pp @@ -43,7 +43,7 @@ class client ( $kerberos_realm = $hadoop_zookeeper::kerberos_realm, ) inherits hadoop_zookeeper { - include common + include hadoop_zookeeper::common package { "zookeeper": ensure => latest, @@ -64,7 +64,7 @@ $ensemble = [$myid, "localhost:2888:3888"], $kerberos_realm = $hadoop_zookeeper::kerberos_realm, ) inherits hadoop_zookeeper { - include common + include hadoop_zookeeper::common package { "zookeeper-server": ensure => latest, diff --git a/bigtop-deploy/puppet/modules/kafka/manifests/init.pp b/bigtop-deploy/puppet/modules/kafka/manifests/init.pp index f44b7378a6..482b51b856 100644 --- a/bigtop-deploy/puppet/modules/kafka/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/kafka/manifests/init.pp @@ -17,7 +17,7 @@ class deploy ($roles) { if ('kafka-server' in $roles) { - include server + include kafka::server } } diff --git a/bigtop-deploy/puppet/modules/qfs/manifests/init.pp b/bigtop-deploy/puppet/modules/qfs/manifests/init.pp index c16027197f..82de8185ff 100644 --- a/bigtop-deploy/puppet/modules/qfs/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/qfs/manifests/init.pp @@ -38,12 +38,12 @@ ensure => directory, owner => root, group => root, - mode => 0755, + mode => '0755', } } class metaserver { - include common + include qfs::common package { "qfs-metaserver": ensure => latest, @@ -63,7 +63,7 @@ ensure => directory, owner => qfs, group => qfs, - mode => 0755, + mode => '0755', before => Service['qfs-metaserver'], require => [ File[$qfs::common::storage_dirs[0]], @@ -98,7 +98,7 @@ } class chunkserver { - include common + include qfs::common package { "qfs-chunkserver": ensure => latest, @@ -118,7 +118,7 @@ ensure => directory, owner => qfs, group => qfs, - mode => 0755, + mode => '0755', before => Service['qfs-chunkserver'], require => [ File[$qfs::common::storage_dirs], @@ -138,7 +138,7 @@ } class client { - include common + include qfs::common package { [ "qfs-client", @@ -155,7 +155,7 @@ file { "/usr/bin/hadoop-qfs": content => template("qfs/hadoop-qfs"), - mode => 0755, + mode => '0755', } } } diff --git a/bigtop-deploy/puppet/modules/spark/manifests/init.pp b/bigtop-deploy/puppet/modules/spark/manifests/init.pp index f5a2d648fd..5437782501 100644 --- a/bigtop-deploy/puppet/modules/spark/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/spark/manifests/init.pp @@ -17,32 +17,32 @@ class deploy ($roles) { if ('spark-client' in $roles) { - include client + include spark::client } if ('spark-on-yarn' in $roles) { - include yarn + include spark::yarn } if ('spark-yarn-slave' in $roles) { - include yarn_slave + include spark::yarn_slave } if ('spark-master' in $roles) { - include master + include spark::master } if ('spark-worker' in $roles) { - include worker + include spark::worker } if ('spark-history-server' in $roles) { - include history_server + include spark::history_server } } class client { - include common + include spark::common package { 'spark-python': ensure => latest, @@ -56,7 +56,7 @@ } class master { - include common + include spark::common package { "spark-master": ensure => latest, @@ -75,7 +75,7 @@ } class worker { - include common + include spark::common package { "spark-worker": ensure => latest, @@ -94,7 +94,7 @@ } class history_server { - include common + include spark::common package { 'spark-history-server': ensure => latest, @@ -113,13 +113,13 @@ } class yarn { - include common - include datanucleus + include spark::common + include spark::datanucleus } class yarn_slave { - include yarn_shuffle - include datanucleus + include spark::yarn_shuffle + include spark::datanucleus } class yarn_shuffle { diff --git a/bigtop-deploy/puppet/modules/zeppelin/manifests/init.pp b/bigtop-deploy/puppet/modules/zeppelin/manifests/init.pp index 98c6e8f321..9c231bc8ba 100644 --- a/bigtop-deploy/puppet/modules/zeppelin/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/zeppelin/manifests/init.pp @@ -17,7 +17,7 @@ class deploy ($roles) { if ('zeppelin-server' in $roles) { - include server + include zeppelin::server } }