ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk" <aonis...@hortonworks.com>
Subject Re: Review Request 20085: metainfo.xml should support os families not os types
Date Mon, 07 Apr 2014 14:59:04 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20085/
-----------------------------------------------------------

(Updated April 7, 2014, 2:58 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Mahadev Konar.


Bugs: AMBARI-5373
    https://issues.apache.org/jira/browse/AMBARI-5373


Repository: ambari


Description
-------

There are many different packages for ubuntu and suse/rhel (snappy, snappy-
devel, net-snmp, net-snmp-utils, lzo, lzo-devel, hadoop-lzo, hadoop-lzo-native
and others). In metainfo our code will turn from this:

    
    
              <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>
    

Will turn into such a copy paste, which is actually the same copy pasted text.

    
    
            <osSpecific>
              <osType>suse11</osType>
              <packages>
              <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>
              </packages>
            </osSpecific>
            <osSpecific>
              <osType>sles11</osType>
              <packages>
              <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>
              </packages>
            </osSpecific>
            <osSpecific>
              <osType>centos6</osType>
               <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>
              </packages>
            </osSpecific>
            <osSpecific>
              <osType>centos5</osType>
              <packages>
                 <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>        
              </packages>
            </osSpecific>
            <osSpecific>
              <osType>redhat6</osType>
              <packages>
              <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>
              </packages>
            </osSpecific>
            <osSpecific>
              <osType>redhat5</osType>
              <packages>
              <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>
              </packages>
            </osSpecific>
            <osSpecific>
              <osType>oraclelinux6</osType>
              <packages>
              <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>
              </packages>
            </osSpecific>
            <osSpecific>
              <osType>oraclelinux5</osType>
              <packages>
              <osType>any</osType>
              <packages>
                <package>
                  <type>rpm</type>
                  <name>lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-libhdfs</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>hadoop-lzo-native</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>snappy-devel</name>
                </package>
                <package>
                  <type>rpm</type>
                  <name>ambari-log4j</name>
                </package>
              </packages>
              </packages>
            </osSpecific>
          </osSpecifics>
    

This is so errorprone, we can forget something for some os, and so on. As a
solution we can check by os family, not os type. And allow comma separated os
in these tags I best is to use code from os_check.py script to detect
os_family.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
c4dbc13 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
ed0ceb4 
  ambari-server/src/main/java/org/apache/ambari/server/state/Host.java f61e46c 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java 9110e45 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceOsSpecific.java f494d4d

  ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java 64fabf5

  ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 24e3f8f 
  ambari-server/src/main/resources/stacks/HDP/1.2.0/repos/repoinfo.xml 8bf9a78 
  ambari-server/src/main/resources/stacks/HDP/1.2.1/repos/repoinfo.xml e8f1855 
  ambari-server/src/main/resources/stacks/HDP/1.3.0/repos/repoinfo.xml daad89d 
  ambari-server/src/main/resources/stacks/HDP/1.3.2.GlusterFS/repos/repoinfo.xml 54ff3b6 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/repos/repoinfo.xml f55fe25 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/metainfo.xml 6aa5b42

  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HBASE/metainfo.xml 7a7c3d6 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/metainfo.xml d29d2fc 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/metainfo.xml caaa514 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/metainfo.xml 0be704a 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/OOZIE/metainfo.xml c473435 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/PIG/metainfo.xml 2b66bbf 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/SQOOP/metainfo.xml 426bb25 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/metainfo.xml d6c2a1f

  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml 07817b1

  ambari-server/src/main/resources/stacks/HDP/1.3.3/repos/repoinfo.xml 6af60d3 
  ambari-server/src/main/resources/stacks/HDP/2.0.5/repos/repoinfo.xml d50bf8c 
  ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/repos/repoinfo.xml dee7e3f 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/repos/repoinfo.xml 0c34907 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/metainfo.xml f9a4c11

  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml c29b564 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml 71c2e72 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/metainfo.xml f4ddded 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/metainfo.xml 3080880 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml f6da775 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/metainfo.xml c163fd4 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/metainfo.xml ee82f0b 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/metainfo.xml 9ddcd3c

  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml d9d0492 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/metainfo.xml 9fac2b3

  ambari-server/src/main/resources/stacks/HDP/2.0/repos/repoinfo.xml a304cd2 
  ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml afb210f 
  ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/metainfo.xml 962fcf2 
  ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/metainfo.xml 1a60125 
  ambari-server/src/main/resources/stacks/HDP/2.1/services/OOZIE/metainfo.xml 3419663 
  ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/metainfo.xml 90bdd4d 
  ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/metainfo.xml dd80f87 
  ambari-server/src/main/resources/stacks/HDP/2.1/services/WEBHCAT/metainfo.xml 3170aaa 
  ambari-server/src/main/resources/stacks/HDP/2.1/services/YARN/metainfo.xml 2d00903 
  ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java 6014bbf

  ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java f5c24ea

  ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
9ff575d 
  ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
930d225 
  ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
cc7078f 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
412b066 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
b9b2962 
  ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java c96fb8c

  ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 3bc4e56

  ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java 0cdf431 
  ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
9969b20 
  ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java 4ac45e3 
  ambari-server/src/test/resources/stacks/HDP/0.1/repos/repoinfo.xml 9ea91b8 
  ambari-server/src/test/resources/stacks/HDP/0.2/repos/repoinfo.xml e5bd698 
  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/GANGLIA/metainfo.xml 09d78a6

  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/HBASE/metainfo.xml 4c610db 
  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/HDFS/metainfo.xml d29d2fc 
  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/HIVE/metainfo.xml 0a0f8fa 
  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/NAGIOS/metainfo.xml a4c500d 
  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/OOZIE/metainfo.xml 487104d 
  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/PIG/metainfo.xml 9fb2c06 
  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/SQOOP/metainfo.xml 426bb25 
  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/WEBHCAT/metainfo.xml d6c2a1f

  ambari-server/src/test/resources/stacks/HDP/1.3.4/services/ZOOKEEPER/metainfo.xml 22c3eb8

  ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/metainfo.xml 0a0f462 
  ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/metainfo.xml 4ab509a 
  ambari-server/src/test/resources/stacks/HDP/2.0.7/services/YARN/metainfo.xml 6dbddbd 
  ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/metainfo.xml 4c17978 
  ambari-server/src/test/resources/stacks/HDP/2.1.1/services/STORM/metainfo.xml 3a750b7 
  ambari-web/app/controllers/installer.js 4d8e21e 
  ambari-web/app/views/wizard/step1_view.js 17211fb 

Diff: https://reviews.apache.org/r/20085/diff/


Testing (updated)
-------

mvn clean test is green


Thanks,

Andrew Onischuk


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message