ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-5894. New slider app wizard should show app-types from /apptypes endpoint. (onechiporenko)
Date Mon, 26 May 2014 14:23:55 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1f51888aa -> bed137b78


AMBARI-5894. New slider app wizard should show app-types from /apptypes endpoint. (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bed137b7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bed137b7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bed137b7

Branch: refs/heads/trunk
Commit: bed137b78c32833e0165ffcb5e89d7b9c3e66325
Parents: 1f51888
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Mon May 26 16:29:08 2014 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Mon May 26 17:23:46 2014 +0300

----------------------------------------------------------------------
 .../resources/ui/app/assets/data/apps/apps.json |   4 +-
 .../ui/app/assets/data/apptypes/all_fields.json | 396 +++++++++++++++++++
 .../src/main/resources/ui/app/initialize.js     |   1 +
 .../ui/app/mappers/application_type.js          | 170 ++++++++
 .../ui/app/mappers/slider_apps_mapper.js        |   5 +-
 .../main/resources/ui/app/models/slider_app.js  |   4 +-
 .../resources/ui/app/models/slider_app_type.js  |   5 +
 .../ui/app/models/slider_app_type_component.js  |   7 +-
 .../resources/ui/app/templates/slider_apps.hbs  |   2 +-
 9 files changed, 585 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json b/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json
index 920cf51..7b5686b 100644
--- a/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json
+++ b/contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json
@@ -13,7 +13,7 @@
       "name" : "PigLatin:pigSmoke.sh",
       "startTime" : 1400598788691,
       "state" : "FINISHED",
-      "type" : "MAPREDUCE",
+      "type" : "HBASE",
       "urls" : null,
       "user" : "ambari-qa",
       "version" : "1.0.0",
@@ -32,7 +32,7 @@
       "name" : "word count",
       "startTime" : 1400598861646,
       "state" : "FINISHED",
-      "type" : "MAPREDUCE",
+      "type" : "ACCUMULO",
       "urls" : null,
       "user" : "ambari-qa",
       "version" : "1.0.0",

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/assets/data/apptypes/all_fields.json
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/data/apptypes/all_fields.json
b/contrib/views/slider/src/main/resources/ui/app/assets/data/apptypes/all_fields.json
new file mode 100644
index 0000000..56fe759
--- /dev/null
+++ b/contrib/views/slider/src/main/resources/ui/app/assets/data/apptypes/all_fields.json
@@ -0,0 +1,396 @@
+{
+  "href" : "http://c6401:8080/api/v1/views/SLIDER/versions/1.0.0/instances/SLIDER_1/apptypes?fields=*",
+  "items" : [
+    {
+      "href" : "http://c6401:8080/api/v1/views/SLIDER/versions/1.0.0/instances/SLIDER_1/apptypes/ACCUMULO",
+      "id" : "ACCUMULO",
+      "instance_name" : "SLIDER_1",
+      "typeComponents" : [
+        {
+          "id" : "ACCUMULO_MASTER",
+          "name" : "ACCUMULO_MASTER",
+          "category" : "MASTER",
+          "displayName" : "ACCUMULO_MASTER",
+          "priority" : 1,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "ACCUMULO_MONITOR",
+          "name" : "ACCUMULO_MONITOR",
+          "category" : "MASTER",
+          "displayName" : "ACCUMULO_MONITOR",
+          "priority" : 3,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "ACCUMULO_GC",
+          "name" : "ACCUMULO_GC",
+          "category" : "MASTER",
+          "displayName" : "ACCUMULO_GC",
+          "priority" : 4,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "ACCUMULO_TRACER",
+          "name" : "ACCUMULO_TRACER",
+          "category" : "MASTER",
+          "displayName" : "ACCUMULO_TRACER",
+          "priority" : 5,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "ACCUMULO_TSERVER",
+          "name" : "ACCUMULO_TSERVER",
+          "category" : "SLAVE",
+          "displayName" : "ACCUMULO_TSERVER",
+          "priority" : 2,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "ACCUMULO_CLIENT",
+          "name" : "ACCUMULO_CLIENT",
+          "category" : "CLIENT",
+          "displayName" : "ACCUMULO_CLIENT",
+          "priority" : 0,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        }
+      ],
+      "typeDescription" : "The Apache Accumulo sorted, distributed key/value store is a robust,\n
       scalable, high performance data storage system that features cell-based\n        access
control and customizable server-side processing. It is based on\n        Google's BigTable
design and is built on top of Apache Hadoop,\n        Zookeeper, and Thrift.\n        Requirements:\n
       1. Ensure parent dir for path (accumulo-site/instance.dfs.dir) is accessible to the
App owner.",
+      "typeName" : "ACCUMULO",
+      "typePackageFileName" : "accumulo_v151.zip",
+      "typeVersion" : "1.5.1",
+      "version" : "1.0.0",
+      "view_name" : "SLIDER",
+      "typeConfigs" : {
+        "agent.conf" : "/slider/agent/conf/agent.ini",
+        "application.def" : "/slider/accumulo_v151.zip",
+        "config_types" : "accumulo-site",
+        "java_home" : "/usr/jdk64/jdk1.7.0_45",
+        "package_list" : "files/accumulo-1.5.1-bin.tar.gz",
+        "site.accumulo-site.gc.port.client" : "0",
+        "site.accumulo-site.general.classpaths" : "$ACCUMULO_HOME/lib/accumulo-server.jar,\n$ACCUMULO_HOME/lib/accumulo-core.jar,\n$ACCUMULO_HOME/lib/accumulo-start.jar,\n$ACCUMULO_HOME/lib/accumulo-fate.jar,\n$ACCUMULO_HOME/lib/accumulo-proxy.jar,\n$ACCUMULO_HOME/lib/[^.].*.jar,\n$ZOOKEEPER_HOME/zookeeper[^.].*.jar,\n$HADOOP_CONF_DIR,\n$HADOOP_PREFIX/[^.].*.jar,\n$HADOOP_PREFIX/lib/[^.].*.jar,\n$HADOOP_PREFIX/share/hadoop/common/.*.jar,\n$HADOOP_PREFIX/share/hadoop/common/lib/.*.jar,\n$HADOOP_PREFIX/share/hadoop/hdfs/.*.jar,\n$HADOOP_PREFIX/share/hadoop/mapreduce/.*.jar,\n$HADOOP_PREFIX/share/hadoop/yarn/.*.jar,\n/usr/lib/hadoop/.*.jar,\n/usr/lib/hadoop/lib/.*.jar,\n/usr/lib/hadoop-hdfs/.*.jar,\n/usr/lib/hadoop-mapreduce/.*.jar,\n/usr/lib/hadoop-yarn/.*.jar,",
+        "site.accumulo-site.instance.dfs.dir" : "/apps/accumulo/data",
+        "site.accumulo-site.instance.secret" : "DEFAULT",
+        "site.accumulo-site.instance.zookeeper.host" : "${ZK_HOST}",
+        "site.accumulo-site.master.port.client" : "0",
+        "site.accumulo-site.monitor.port.client" : "${ACCUMULO_MONITOR.ALLOCATED_PORT}",
+        "site.accumulo-site.monitor.port.log4j" : "0",
+        "site.accumulo-site.trace.port.client" : "0",
+        "site.accumulo-site.trace.token.property.password" : "secret",
+        "site.accumulo-site.trace.user" : "root",
+        "site.accumulo-site.tserver.cache.data.size" : "7M",
+        "site.accumulo-site.tserver.cache.index.size" : "20M",
+        "site.accumulo-site.tserver.memory.maps.max" : "80M",
+        "site.accumulo-site.tserver.port.client" : "0",
+        "site.accumulo-site.tserver.sort.buffer.size" : "50M",
+        "site.accumulo-site.tserver.walog.max.size" : "100M",
+        "site.global.accumulo_instance_name" : "instancename",
+        "site.global.accumulo_root_password" : "secret",
+        "site.global.app_install_dir" : "${AGENT_WORK_ROOT}/app/install",
+        "site.global.app_log_dir" : "${AGENT_LOG_ROOT}/app/log",
+        "site.global.app_pid_dir" : "${AGENT_WORK_ROOT}/app/run",
+        "site.global.app_root" : "${AGENT_WORK_ROOT}/app/install/accumulo-1.5.1",
+        "site.global.app_user" : "yarn",
+        "site.global.gc_heapsize" : "64m",
+        "site.global.hadoop_conf_dir" : "/etc/hadoop/conf",
+        "site.global.hadoop_prefix" : "/usr/lib/hadoop",
+        "site.global.master_heapsize" : "128m",
+        "site.global.monitor_heapsize" : "64m",
+        "site.global.other_heapsize" : "128m",
+        "site.global.security_enabled" : "false",
+        "site.global.tserver_heapsize" : "128m",
+        "site.global.user_group" : "hadoop",
+        "site.global.zookeeper_home" : "/usr/lib/zookeeper"
+      }
+    },
+    {
+      "href" : "http://c6401:8080/api/v1/views/SLIDER/versions/1.0.0/instances/SLIDER_1/apptypes/HBASE",
+      "id" : "HBASE",
+      "instance_name" : "SLIDER_1",
+      "typeComponents" : [
+        {
+          "id" : "HBASE_MASTER",
+          "name" : "HBASE_MASTER",
+          "category" : "MASTER",
+          "displayName" : "HBASE_MASTER",
+          "priority" : 1,
+          "instanceCount" : 1,
+          "maxInstanceCount" : 2,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "HBASE_REGIONSERVER",
+          "name" : "HBASE_REGIONSERVER",
+          "category" : "SLAVE",
+          "displayName" : "HBASE_REGIONSERVER",
+          "priority" : 2,
+          "instanceCount" : 1,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "HBASE_CLIENT",
+          "name" : "HBASE_CLIENT",
+          "category" : "CLIENT",
+          "displayName" : "HBASE_CLIENT",
+          "priority" : 0,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        }
+      ],
+      "typeDescription" : "Apache HBase is the Hadoop database, a distributed, scalable,
big data store.\n        Requirements:\n        1. Ensure parent dir for path (hbase-site/hbase.rootdir)
is accessible to the App owner.\n        2. Ensure ZK root (hbase-site/zookeeper.znode.parent)
is unique for the App instance.",
+      "typeName" : "HBASE",
+      "typePackageFileName" : "hbase_v096 (1).zip",
+      "typeVersion" : "0.96.0.2.1.1",
+      "version" : "1.0.0",
+      "view_name" : "SLIDER",
+      "typeConfigs" : {
+        "agent.conf" : "/slider/agent/conf/agent.ini",
+        "application.def" : "/slider/hbase_v096.zip",
+        "config_types" : "core-site,hdfs-site,hbase-site",
+        "java_home" : "/usr/jdk64/jdk1.7.0_45",
+        "package_list" : "files/hbase-0.96.1-hadoop2-bin.tar.gz",
+        "site.core-site.fs.defaultFS" : "${NN_URI}",
+        "site.global.app_install_dir" : "${AGENT_WORK_ROOT}/app/install",
+        "site.global.app_log_dir" : "${AGENT_LOG_ROOT}/app/log",
+        "site.global.app_pid_dir" : "${AGENT_WORK_ROOT}/app/run",
+        "site.global.app_root" : "${AGENT_WORK_ROOT}/app/install/hbase-0.96.1-hadoop2",
+        "site.global.app_user" : "yarn",
+        "site.global.ganglia_server_host" : "${NN_HOST}",
+        "site.global.ganglia_server_id" : "Application1",
+        "site.global.ganglia_server_port" : "8667",
+        "site.global.hbase_master_heapsize" : "1024m",
+        "site.global.hbase_regionserver_heapsize" : "1024m",
+        "site.global.security_enabled" : "false",
+        "site.global.user_group" : "hadoop",
+        "site.hbase-site.hbase.client.keyvalue.maxsize" : "10485760",
+        "site.hbase-site.hbase.client.scanner.caching" : "100",
+        "site.hbase-site.hbase.cluster.distributed" : "true",
+        "site.hbase-site.hbase.defaults.for.version.skip" : "true",
+        "site.hbase-site.hbase.hregion.majorcompaction" : "86400000",
+        "site.hbase-site.hbase.hregion.max.filesize" : "10737418240",
+        "site.hbase-site.hbase.hregion.memstore.block.multiplier" : "2",
+        "site.hbase-site.hbase.hregion.memstore.flush.size" : "134217728",
+        "site.hbase-site.hbase.hregion.memstore.mslab.enabled" : "true",
+        "site.hbase-site.hbase.hstore.blockingStoreFiles" : "10",
+        "site.hbase-site.hbase.hstore.compactionThreshold" : "3",
+        "site.hbase-site.hbase.hstore.flush.retries.number" : "120",
+        "site.hbase-site.hbase.local.dir" : "${hbase.tmp.dir}/local",
+        "site.hbase-site.hbase.master.info.port" : "${HBASE_MASTER.ALLOCATED_PORT}",
+        "site.hbase-site.hbase.regionserver.global.memstore.lowerLimit" : "0.38",
+        "site.hbase-site.hbase.regionserver.global.memstore.upperLimit" : "0.4",
+        "site.hbase-site.hbase.regionserver.handler.count" : "60",
+        "site.hbase-site.hbase.regionserver.info.port" : "0",
+        "site.hbase-site.hbase.regionserver.port" : "0",
+        "site.hbase-site.hbase.rootdir" : "${NN_URI}/apps/hbase/data",
+        "site.hbase-site.hbase.security.authentication" : "simple",
+        "site.hbase-site.hbase.security.authorization" : "false",
+        "site.hbase-site.hbase.stagingdir" : "${NN_URI}/apps/hbase/staging",
+        "site.hbase-site.hbase.superuser" : "yarn",
+        "site.hbase-site.hbase.tmp.dir" : "${AGENT_WORK_ROOT}/work/app/tmp",
+        "site.hbase-site.hbase.zookeeper.property.clientPort" : "2181",
+        "site.hbase-site.hbase.zookeeper.quorum" : "${ZK_HOST}",
+        "site.hbase-site.hbase.zookeeper.useMulti" : "true",
+        "site.hbase-site.hfile.block.cache.size" : "0.40",
+        "site.hbase-site.zookeeper.session.timeout" : "30000",
+        "site.hbase-site.zookeeper.znode.parent" : "/hbase-unsecure",
+        "site.hdfs-site.dfs.namenode.http-address" : "${NN_HOST}:50070",
+        "site.hdfs-site.dfs.namenode.https-address" : "${NN_HOST}:50470"
+      }
+    },
+    {
+      "href" : "http://c6401:8080/api/v1/views/SLIDER/versions/1.0.0/instances/SLIDER_1/apptypes/STORM",
+      "id" : "STORM",
+      "instance_name" : "SLIDER_1",
+      "typeComponents" : [
+        {
+          "id" : "NIMBUS",
+          "name" : "NIMBUS",
+          "category" : "MASTER",
+          "displayName" : "NIMBUS",
+          "priority" : 1,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "STORM_REST_API",
+          "name" : "STORM_REST_API",
+          "category" : "MASTER",
+          "displayName" : "STORM_REST_API",
+          "priority" : 2,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "SUPERVISOR",
+          "name" : "SUPERVISOR",
+          "category" : "SLAVE",
+          "displayName" : "SUPERVISOR",
+          "priority" : 5,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "STORM_UI_SERVER",
+          "name" : "STORM_UI_SERVER",
+          "category" : "MASTER",
+          "displayName" : "STORM_UI_SERVER",
+          "priority" : 3,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        },
+        {
+          "id" : "DRPC_SERVER",
+          "name" : "DRPC_SERVER",
+          "category" : "MASTER",
+          "displayName" : "DRPC_SERVER",
+          "priority" : 4,
+          "instanceCount" : 0,
+          "maxInstanceCount" : 0,
+          "yarnMemory" : 1024,
+          "yarnCpuCores" : 1
+        }
+      ],
+      "typeDescription" : "Apache Hadoop Stream processing framework",
+      "typeName" : "STORM",
+      "typePackageFileName" : "storm_v091.zip",
+      "typeVersion" : "0.9.1.2.1",
+      "version" : "1.0.0",
+      "view_name" : "SLIDER",
+      "typeConfigs" : {
+        "agent.conf" : "/slider/agent/conf/agent.ini",
+        "application.def" : "/slider/storm_v091.zip",
+        "config_types" : "storm-site",
+        "java_home" : "/usr/jdk64/jdk1.7.0_45",
+        "package_list" : "files/apache-storm-0.9.1.2.1.1.0-237.tar.gz",
+        "site.global.app_root" : "${AGENT_WORK_ROOT}/app/install/apache-storm-0.9.1.2.1.1.0-237",
+        "site.global.app_user" : "yarn",
+        "site.global.ganglia_server_host" : "${NN_HOST}",
+        "site.global.ganglia_server_id" : "Application2",
+        "site.global.rest_api_admin_port" : "${STORM_REST_API.ALLOCATED_PORT}",
+        "site.global.rest_api_port" : "${STORM_REST_API.ALLOCATED_PORT}",
+        "site.global.security_enabled" : "false",
+        "site.global.user_group" : "hadoop",
+        "site.storm-site.dev.zookeeper.path" : "${AGENT_WORK_ROOT}/app/tmp/dev-storm-zookeeper",
+        "site.storm-site.drpc.childopts" : "-Xmx768m",
+        "site.storm-site.drpc.invocations.port" : "${DRPC_SERVER.ALLOCATED_PORT}",
+        "site.storm-site.drpc.port" : "${DRPC_SERVER.ALLOCATED_PORT}",
+        "site.storm-site.drpc.queue.size" : "128",
+        "site.storm-site.drpc.request.timeout.secs" : "600",
+        "site.storm-site.drpc.worker.threads" : "64",
+        "site.storm-site.java.library.path" : "/usr/local/lib:/opt/local/lib:/usr/lib",
+        "site.storm-site.logviewer.appender.name" : "A1",
+        "site.storm-site.logviewer.childopts" : "-Xmx128m",
+        "site.storm-site.logviewer.port" : "${SUPERVISOR.ALLOCATED_PORT}",
+        "site.storm-site.nimbus.childopts" : "-Xmx1024m -Djava.security.auth.login.config=/etc/storm/storm_jaas.conf
-javaagent:${AGENT_WORK_ROOT}/app/install/apache-storm-0.9.1.2.1.1.0-237/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host={0},port=8669,wireformat31x=true,mode=multicast,config=${AGENT_WORK_ROOT}/app/install/apache-storm-0.9.1.2.1.1.0-237/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM",
+        "site.storm-site.nimbus.cleanup.inbox.freq.secs" : "600",
+        "site.storm-site.nimbus.file.copy.expiration.secs" : "600",
+        "site.storm-site.nimbus.host" : "${NIMBUS_HOST}",
+        "site.storm-site.nimbus.inbox.jar.expiration.secs" : "3600",
+        "site.storm-site.nimbus.monitor.freq.secs" : "10",
+        "site.storm-site.nimbus.reassign" : "true",
+        "site.storm-site.nimbus.supervisor.timeout.secs" : "60",
+        "site.storm-site.nimbus.task.launch.secs" : "120",
+        "site.storm-site.nimbus.task.timeout.secs" : "30",
+        "site.storm-site.nimbus.thrift.max_buffer_size" : "1048576",
+        "site.storm-site.nimbus.thrift.port" : "${NIMBUS.ALLOCATED_PORT}",
+        "site.storm-site.nimbus.topology.validator" : "backtype.storm.nimbus.DefaultTopologyValidator",
+        "site.storm-site.storm.cluster.mode" : "distributed",
+        "site.storm-site.storm.local.dir" : "${AGENT_WORK_ROOT}/app/tmp/storm",
+        "site.storm-site.storm.local.mode.zmq" : "false",
+        "site.storm-site.storm.messaging.netty.buffer_size" : "5242880",
+        "site.storm-site.storm.messaging.netty.client_worker_threads" : "1",
+        "site.storm-site.storm.messaging.netty.max_retries" : "30",
+        "site.storm-site.storm.messaging.netty.max_wait_ms" : "1000",
+        "site.storm-site.storm.messaging.netty.min_wait_ms" : "100",
+        "site.storm-site.storm.messaging.netty.server_worker_threads" : "1",
+        "site.storm-site.storm.messaging.transport" : "backtype.storm.messaging.netty.Context",
+        "site.storm-site.storm.thrift.transport" : "backtype.storm.security.auth.SimpleTransportPlugin",
+        "site.storm-site.storm.zookeeper.connection.timeout" : "15000",
+        "site.storm-site.storm.zookeeper.port" : "2181",
+        "site.storm-site.storm.zookeeper.retry.interval" : "1000",
+        "site.storm-site.storm.zookeeper.retry.intervalceiling.millis" : "30000",
+        "site.storm-site.storm.zookeeper.retry.times" : "5",
+        "site.storm-site.storm.zookeeper.root" : "/storm",
+        "site.storm-site.storm.zookeeper.servers" : "['${ZK_HOST}']",
+        "site.storm-site.storm.zookeeper.session.timeout" : "20000",
+        "site.storm-site.supervisor.childopts" : "-Xmx256m -Djava.security.auth.login.config=/etc/storm/storm_jaas.conf
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=${SUPERVISOR.ALLOCATED_PORT} -javaagent:${AGENT_WORK_ROOT}/app/install/apache-storm-0.9.1.2.1.1.0-237/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host={0},port=8669,wireformat31x=true,mode=multicast,config=${AGENT_WORK_ROOT}/app/install/apache-storm-0.9.1.2.1.1.0-237/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM",
+        "site.storm-site.supervisor.enable" : "true",
+        "site.storm-site.supervisor.heartbeat.frequency.secs" : "5",
+        "site.storm-site.supervisor.monitor.frequency.secs" : "3",
+        "site.storm-site.supervisor.slots.ports" : "[${SUPERVISOR.ALLOCATED_PORT}, ${SUPERVISOR.ALLOCATED_PORT}]",
+        "site.storm-site.supervisor.worker.start.timeout.secs" : "120",
+        "site.storm-site.supervisor.worker.timeout.secs" : "30",
+        "site.storm-site.task.heartbeat.frequency.secs" : "3",
+        "site.storm-site.task.refresh.poll.secs" : "10",
+        "site.storm-site.topology.acker.executors" : "null",
+        "site.storm-site.topology.builtin.metrics.bucket.size.secs" : "60",
+        "site.storm-site.topology.debug" : "false",
+        "site.storm-site.topology.disruptor.wait.strategy" : "com.lmax.disruptor.BlockingWaitStrategy",
+        "site.storm-site.topology.enable.message.timeouts" : "true",
+        "site.storm-site.topology.error.throttle.interval.secs" : "10",
+        "site.storm-site.topology.executor.receive.buffer.size" : "1024",
+        "site.storm-site.topology.executor.send.buffer.size" : "1024",
+        "site.storm-site.topology.fall.back.on.java.serialization" : "true",
+        "site.storm-site.topology.kryo.factory" : "backtype.storm.serialization.DefaultKryoFactory",
+        "site.storm-site.topology.max.error.report.per.interval" : "5",
+        "site.storm-site.topology.max.spout.pending" : "null",
+        "site.storm-site.topology.max.task.parallelism" : "null",
+        "site.storm-site.topology.message.timeout.secs" : "30",
+        "site.storm-site.topology.optimize" : "true",
+        "site.storm-site.topology.receiver.buffer.size" : "8",
+        "site.storm-site.topology.skip.missing.kryo.registrations" : "false",
+        "site.storm-site.topology.sleep.spout.wait.strategy.time.ms" : "1",
+        "site.storm-site.topology.spout.wait.strategy" : "backtype.storm.spout.SleepSpoutWaitStrategy",
+        "site.storm-site.topology.state.synchronization.timeout.secs" : "60",
+        "site.storm-site.topology.stats.sample.rate" : "0.05",
+        "site.storm-site.topology.tick.tuple.freq.secs" : "null",
+        "site.storm-site.topology.transfer.buffer.size" : "1024",
+        "site.storm-site.topology.trident.batch.emit.interval.millis" : "500",
+        "site.storm-site.topology.tuple.serializer" : "backtype.storm.serialization.types.ListDelegateSerializer",
+        "site.storm-site.topology.worker.childopts" : "null",
+        "site.storm-site.topology.worker.shared.thread.pool.size" : "4",
+        "site.storm-site.topology.workers" : "1",
+        "site.storm-site.transactional.zookeeper.port" : "null",
+        "site.storm-site.transactional.zookeeper.root" : "/transactional",
+        "site.storm-site.transactional.zookeeper.servers" : "null",
+        "site.storm-site.ui.port" : "${STORM_UI_SERVER.ALLOCATED_PORT}",
+        "site.storm-site.worker.childopts" : "-Xmx768m -javaagent:${AGENT_WORK_ROOT}/app/install/apache-storm-0.9.1.2.1.1.0-237/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host={0},port=8669,wireformat31x=true,mode=multicast,config=${AGENT_WORK_ROOT}/app/install/apache-storm-0.9.1.2.1.1.0-237/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Worker_%ID%_JVM",
+        "site.storm-site.worker.heartbeat.frequency.secs" : "1",
+        "site.storm-site.zmq.hwm" : "0",
+        "site.storm-site.zmq.linger.millis" : "5000",
+        "site.storm-site.zmq.threads" : "1"
+      }
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/initialize.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/initialize.js b/contrib/views/slider/src/main/resources/ui/app/initialize.js
index 6da6267..08ee2bc 100755
--- a/contrib/views/slider/src/main/resources/ui/app/initialize.js
+++ b/contrib/views/slider/src/main/resources/ui/app/initialize.js
@@ -86,6 +86,7 @@ App.initializer({
 
     });
     application.ApplicationStatusMapper.loop('load');
+    application.ApplicationTypeMapper.loop('load');
     application.SliderAppsMapper.loop('load');
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js b/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
new file mode 100644
index 0000000..b737d9b
--- /dev/null
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
@@ -0,0 +1,170 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Mapper for <code>App.SliderAppType</code> and <code>App.SliderAppComponent</code>
models
+ * For nested models:
+ * <ul>
+ *   <li>
+ *     Define property (P1) started with '$' in <code>map</code> (example - $components).
+ *   </li>
+ *   <li>
+ *     Define property componentsMap (P1 without '$' and with suffix 'Map').
+ *     It is used as map for nested models
+ *   </li>
+ *   <li>
+ *     Define property componentsParentField (P1 without '$' and with suffix 'ParentField').
+ *     It  is used as property in nested model to link it with parent model
+ *   </li>
+ * </ul>
+ * @type {App.Mapper}
+ */
+App.ApplicationTypeMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
+
+  /**
+   * Url suffix
+   * Used with <code>App.urlPrefix</code>
+   * @type {string}
+   */
+  urlSuffix: 'apptypes?fields=*',
+
+  /**
+   * Map for parsing JSON received from server
+   * Format:
+   *  <code>
+   *    {
+   *      key1: 'path1',
+   *      key2: 'path2',
+   *      key3: 'path3'
+   *    }
+   *  </code>
+   *  Keys - names for properties in App
+   *  Values - pathes in JSON
+   * @type {object}
+   */
+  map: {
+    id: 'id',
+    configs: 'typeConfigs',
+    displayName: 'typeName',
+    index: 'id',
+    description: 'typeDescription',
+    /**
+     * Map array to nested models
+     * Use <code>('$components').replace('$', '') + 'Map'</code> property as
map
+     * Use <code>('$components').replace('$', '') + 'Model'</code> property as
model to save data
+     */
+    $components: 'typeComponents'
+  },
+
+  /**
+   * Map for <code>App.SliderAppTypeComponent</code>
+   * @type {object}
+   */
+  componentsMap: {
+    id: 'id',
+    name: 'name',
+    displayName: 'displayName',
+    defaultNumInstances: 'instanceCount',
+    defaultYARNMemory: 'yarnMemory',
+    defaultYARNCPU: 'yarnCpuCores'
+  },
+
+  /**
+   * Nested model name - <code>App.SliderAppTypeComponent</code>
+   * @type {string}
+   */
+  componentsModel: 'sliderAppTypeComponent',
+
+  /**
+   * Field in <code>App.SliderAppTypeComponent</code> with parent model link
+   * @type {string}
+   */
+  componentsParentField: 'appType',
+
+  /**
+   * Load data from <code>App.urlPrefix + this.urlSuffix</code> one time
+   * @method load
+   * @return {$.ajax}
+   */
+  load: function() {
+    console.log('App.ApplicationTypeMapper loading data');
+    var self = this,
+      url = App.get('testMode') ? '/data/apptypes/all_fields.json' : App.get('urlPrefix')
+ this.get('urlSuffix');
+
+    return $.ajax({
+      url: url,
+      dataType: 'json',
+      async: true,
+      success: function(data) {self.parse(data);}
+    });
+  },
+
+  /**
+   * Parse loaded data according to <code>map</code>
+   * Load <code>App.SliderAppType</code> models
+   * @param {object} data received from server data
+   * @method parse
+   */
+  parse: function(data) {
+    var map = this.get('map'),
+      app_types = [],
+      self = this;
+    data.items.forEach(function(app_type) {
+      var model = {};
+      Ember.keys(map).forEach(function(key) {
+        // Property should be parsed as array of nested models
+        if ('$' == key[0]) {
+          var k = key.replace('$', '');
+          var components = self.parseNested(Ember.get(app_type, map[key]), k, app_type.id);
+          // save nested models and then link them with parent model
+          App.SliderApp.store.pushMany(self.get(k + 'Model'), components);
+          Ember.set(model, k, components.mapProperty('id'));
+        }
+        else {
+          Ember.set(model, key, Ember.getWithDefault(app_type, map[key], ''));
+        }
+      });
+      app_types.pushObject(model);
+    });
+    App.SliderApp.store.pushMany('sliderAppType', app_types);
+  },
+
+  /**
+   * Parse array of objects as list of nested models
+   * @param {object[]} data data to parse
+   * @param {string} k property name
+   * @param {string} parentId parent model's id
+   * @return {object[]} mapped models
+   * @method parseNested
+   */
+  parseNested: function(data, k, parentId) {
+    var models = [],
+      map = this.get(k + 'Map'),
+      parentField = this.get(k + 'ParentField');
+    data.forEach(function(item) {
+      var model = {id: item.id};
+      model[parentField] = parentId; // link to parent model
+      Ember.keys(map).forEach(function(key) {
+        Ember.set(model, key, Ember.getWithDefault(item, map[key], ''));
+      });
+      models.pushObject(model);
+    });
+    return models;
+  }
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 48925fc..4127e20 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -17,8 +17,7 @@
  */
 
 /**
- * Mapper for SLIDER_1 status
- * Save mapped data to App properties
+ * Mapper for <code>App.SliderApp</code> and <code>App.QuickLink</code>
models
  * @type {App.Mapper}
  */
 App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
@@ -49,7 +48,7 @@ App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically,
{
 
   /**
    * Parse loaded data according to <code>map</code>
-   * Set <code>App</code> properties
+   * Load <code>App.SliderApp</code> and <code>App.QuickLink</code>
models
    * @param {object} data received from server data
    * @method parse
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
index e7ca7f3..0150ea6 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
@@ -54,9 +54,9 @@ App.SliderApp = DS.Model.extend({
   ended: DS.attr('number'),
 
   /**
-   * @type {string}
+   * @type {App.SliderAppType}
    */
-  appType: DS.attr('string'),
+  appType: DS.belongsTo('sliderAppType'),
 
   /**
    * @type {string}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js
index e3bf522..9415429 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type.js
@@ -34,6 +34,11 @@ App.SliderAppType = DS.Model.extend({
   components: DS.hasMany('sliderAppTypeComponent', {async:true}),
 
   /**
+   * @type {string}
+   */
+  description: DS.attr('string'),
+
+  /**
    * @type {object}
    */
   configs: {}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type_component.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type_component.js
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type_component.js
index 4676d2c..50edd18 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type_component.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_type_component.js
@@ -46,7 +46,12 @@ App.SliderAppTypeComponent = DS.Model.extend({
   /**
    * @type {number}
    */
-  defaultYARNCPU: DS.attr('number')
+  defaultYARNCPU: DS.attr('number'),
+
+  /**
+   * @type {App.SliderAppType}
+   */
+  appType: DS.belongsTo('sliderAppType')
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bed137b7/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
index 2f16df1..024e638 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
@@ -57,7 +57,7 @@
 
           <td>{{slider.status}}</td>
 
-          <td>{{slider.appType}}</td>
+          <td>{{slider.appType.displayName}}</td>
 
           <td>{{slider.user}}</td>
 


Mime
View raw message