瀏覽代碼

YARN-1021. Yarn Scheduler Load Simulator. (ywskycn via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1527059 13f79535-47bb-0310-9956-ffa450edef68
Alejandro Abdelnur 11 年之前
父節點
當前提交
58b08e11b9
共有 71 個文件被更改,包括 36833 次插入0 次删除
  1. 45 0
      hadoop-assemblies/src/main/resources/assemblies/hadoop-sls.xml
  2. 11 0
      hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml
  3. 10 0
      hadoop-project/pom.xml
  4. 1 0
      hadoop-project/src/site/site.xml
  5. 12 0
      hadoop-tools/hadoop-sls/README
  6. 26 0
      hadoop-tools/hadoop-sls/dev-support/findbugs-exclude.xml
  7. 184 0
      hadoop-tools/hadoop-sls/pom.xml
  8. 55 0
      hadoop-tools/hadoop-sls/src/main/assemblies/sls.xml
  9. 106 0
      hadoop-tools/hadoop-sls/src/main/bin/rumen2sls.sh
  10. 112 0
      hadoop-tools/hadoop-sls/src/main/bin/slsrun.sh
  11. 10229 0
      hadoop-tools/hadoop-sls/src/main/data/2jobs2min-rumen-jh.json
  12. 18 0
      hadoop-tools/hadoop-sls/src/main/html/css/bootstrap-responsive.min.css
  13. 36 0
      hadoop-tools/hadoop-sls/src/main/html/css/bootstrap.min.css
  14. 5 0
      hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/bootstrap.min.js
  15. 26 0
      hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3-LICENSE
  16. 8823 0
      hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js
  17. 9789 0
      hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/jquery.js
  18. 334 0
      hadoop-tools/hadoop-sls/src/main/html/showSimulationTrace.html
  19. 278 0
      hadoop-tools/hadoop-sls/src/main/html/simulate.html.template
  20. 50 0
      hadoop-tools/hadoop-sls/src/main/html/simulate.info.html.template
  21. 193 0
      hadoop-tools/hadoop-sls/src/main/html/track.html.template
  22. 234 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/RumenToSLSConverter.java
  23. 526 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java
  24. 385 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/AMSimulator.java
  25. 405 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/MRAMSimulator.java
  26. 68 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/conf/SLSConfiguration.java
  27. 261 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/nodemanager/NMSimulator.java
  28. 167 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/nodemanager/NodeInfo.java
  29. 31 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/CapacitySchedulerMetrics.java
  30. 113 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/ContainerSimulator.java
  31. 266 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/FairSchedulerMetrics.java
  32. 58 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/FifoSchedulerMetrics.java
  33. 30 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/NodeUpdateSchedulerEventWrapper.java
  34. 141 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/RMNodeWrapper.java
  35. 855 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/ResourceSchedulerWrapper.java
  36. 100 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/SchedulerMetrics.java
  37. 183 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/TaskRunner.java
  38. 133 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/utils/SLSUtils.java
  39. 527 0
      hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/web/SLSWebApp.java
  40. 67 0
      hadoop-tools/hadoop-sls/src/main/sample-conf/capacity-scheduler.xml
  41. 50 0
      hadoop-tools/hadoop-sls/src/main/sample-conf/fair-scheduler-allocation.xml
  42. 47 0
      hadoop-tools/hadoop-sls/src/main/sample-conf/fair-scheduler.xml
  43. 19 0
      hadoop-tools/hadoop-sls/src/main/sample-conf/log4j.properties
  44. 81 0
      hadoop-tools/hadoop-sls/src/main/sample-conf/sls-runner.xml
  45. 60 0
      hadoop-tools/hadoop-sls/src/main/sample-conf/yarn-site.xml
  46. 440 0
      hadoop-tools/hadoop-sls/src/site/apt/SchedulerLoadSimulator.apt.vm
  47. 30 0
      hadoop-tools/hadoop-sls/src/site/resources/css/site.css
  48. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_JVM.png
  49. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_arch.png
  50. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_cluster_memory.png
  51. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_cluster_vcores.png
  52. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_queue_allocated_memory.png
  53. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_queue_allocated_vcores.png
  54. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_running_apps_containers.png
  55. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_scheduler_operation_timecost.png
  56. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_track_job.png
  57. 二進制
      hadoop-tools/hadoop-sls/src/site/resources/images/sls_track_queue.png
  58. 46 0
      hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/TestSLSRunner.java
  59. 247 0
      hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/scheduler/TestTaskRunner.java
  60. 34 0
      hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/utils/TestSLSUtils.java
  61. 121 0
      hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/web/TestSLSWebApp.java
  62. 50 0
      hadoop-tools/hadoop-sls/src/test/resources/fair-scheduler-allocation.xml
  63. 47 0
      hadoop-tools/hadoop-sls/src/test/resources/fair-scheduler.xml
  64. 278 0
      hadoop-tools/hadoop-sls/src/test/resources/simulate.html.template
  65. 50 0
      hadoop-tools/hadoop-sls/src/test/resources/simulate.info.html.template
  66. 81 0
      hadoop-tools/hadoop-sls/src/test/resources/sls-runner.xml
  67. 193 0
      hadoop-tools/hadoop-sls/src/test/resources/track.html.template
  68. 58 0
      hadoop-tools/hadoop-sls/src/test/resources/yarn-site.xml
  69. 5 0
      hadoop-tools/hadoop-tools-dist/pom.xml
  70. 1 0
      hadoop-tools/pom.xml
  71. 2 0
      hadoop-yarn-project/CHANGES.txt

+ 45 - 0
hadoop-assemblies/src/main/resources/assemblies/hadoop-sls.xml

@@ -0,0 +1,45 @@
+<!--
+  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.
+-->
+<assembly>
+  <id>hadoop-sls</id>
+  <formats>
+    <format>dir</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+
+  <fileSets>
+    <fileSet>
+      <directory>${basedir}/src/main/bin</directory>
+      <outputDirectory>sls/bin</outputDirectory>
+      <fileMode>0755</fileMode>
+    </fileSet>
+    <fileSet>
+      <directory>${basedir}/src/main/html</directory>
+      <outputDirectory>sls/html</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${basedir}/src/main/sample-conf</directory>
+      <outputDirectory>sls/sample-conf</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${basedir}/src/main/data</directory>
+      <outputDirectory>sls/sample-data</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+</assembly>

+ 11 - 0
hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml

@@ -93,6 +93,17 @@
         <include>*-sources.jar</include>
       </includes>
     </fileSet>
+    <fileSet>
+      <directory>../hadoop-sls/target</directory>
+      <outputDirectory>/share/hadoop/${hadoop.component}/sources</outputDirectory>
+      <includes>
+        <include>*-sources.jar</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>../hadoop-sls/target/hadoop-sls-${project.version}/sls</directory>
+      <outputDirectory>/share/hadoop/${hadoop.component}/sls</outputDirectory>
+    </fileSet>
   </fileSets>
   <dependencySets>
     <dependencySet>

+ 10 - 0
hadoop-project/pom.xml

@@ -730,6 +730,16 @@
         <artifactId>hsqldb</artifactId>
         <version>2.0.0</version>
       </dependency>
+      <dependency>
+        <groupId>com.codahale.metrics</groupId>
+        <artifactId>metrics-core</artifactId>
+        <version>3.0.0</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.hadoop</groupId>
+        <artifactId>hadoop-sls</artifactId>
+        <version>${project.version}</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 

+ 1 - 0
hadoop-project/src/site/site.xml

@@ -95,6 +95,7 @@
       <item name="Fair Scheduler" href="hadoop-yarn/hadoop-yarn-site/FairScheduler.html"/>
       <item name="Web Application Proxy" href="hadoop-yarn/hadoop-yarn-site/WebApplicationProxy.html"/>
       <item name="YARN Commands" href="hadoop-yarn/hadoop-yarn-site/YarnCommands.html"/>
+      <item name="Scheduler Load Simulator" href="hadoop-sls/SchedulerLoadSimulator.html"/>
     </menu>
 
     <menu name="YARN REST APIs" inherit="top">

+ 12 - 0
hadoop-tools/hadoop-sls/README

@@ -0,0 +1,12 @@
+Yarn Scheduler Load Simulator (SLS)
+
+SLS is a stress and performance harness for the Yarn Resource Manager Scheduler
+that exercises the scheduler implementation simulating the cluster size and the
+applications load without having to have a cluster nor applications.
+
+SLS runs a regular RM without RPC endpoints and uses a NodeManager and
+Application Manager simulators to send and receive events simulating cluster
+and application load behavior.
+
+The size of the cluster and the application load is scripted in a configuration
+file.

+ 26 - 0
hadoop-tools/hadoop-sls/dev-support/findbugs-exclude.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+<FindBugsFilter>
+
+ <!-- Ignore comparedTo, equals warnings -->
+  <Match>
+    <Class name="org.apache.hadoop.yarn.sls.scheduler.ContainerSimulator" />
+    <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
+  </Match>
+
+</FindBugsFilter>

+ 184 - 0
hadoop-tools/hadoop-sls/pom.xml

@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.hadoop</groupId>
+    <artifactId>hadoop-project</artifactId>
+    <version>3.0.0-SNAPSHOT</version>
+    <relativePath>../../hadoop-project</relativePath>
+  </parent>
+  <groupId>org.apache.hadoop</groupId>
+  <artifactId>hadoop-sls</artifactId>
+  <version>3.0.0-SNAPSHOT</version>
+  <description>Apache Hadoop Scheduler Load Simulator</description>
+  <name>Apache Hadoop Scheduler Load Simulator</name>
+  <packaging>jar</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-client</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-minicluster</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-rumen</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.codahale.metrics</groupId>
+      <artifactId>metrics-core</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty</artifactId>
+      <scope>provided</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>servlet-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <configuration>
+          <attach>true</attach>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <configuration>
+          <findbugsXmlOutput>true</findbugsXmlOutput>
+          <xmlOutput>true</xmlOutput>
+          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
+          <effort>Max</effort>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>src/main/data/2jobs2min-rumen-jh.json</exclude>
+            <exclude>src/main/html/js/thirdparty/jquery.js</exclude>
+            <exclude>src/main/html/js/thirdparty/d3-LICENSE</exclude>
+            <exclude>src/main/html/js/thirdparty/d3.v3.js</exclude>
+            <exclude>src/main/html/simulate.html.template</exclude>
+            <exclude>src/main/html/simulate.info.html.template</exclude>
+            <exclude>src/main/html/track.html.template</exclude>
+            <exclude>src/test/resources/simulate.html.template</exclude>
+            <exclude>src/test/resources/simulate.info.html.template</exclude>
+            <exclude>src/test/resources/track.html.template</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>docs</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-site-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                  <goal>site</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>dist</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.hadoop</groupId>
+                <artifactId>hadoop-assemblies</artifactId>
+                <version>${project.version}</version>
+              </dependency>
+            </dependencies>
+            <executions>
+              <execution>
+                <id>dist</id>
+                <phase>prepare-package</phase>
+                <goals>
+                  <goal>single</goal>
+                </goals>
+                <configuration>
+                  <appendAssemblyId>false</appendAssemblyId>
+                  <attach>false</attach>
+                  <finalName>${project.artifactId}-${project.version}</finalName>
+                  <descriptorRefs>
+                    <descriptorRef>hadoop-sls</descriptorRef>
+                  </descriptorRefs>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

+ 55 - 0
hadoop-tools/hadoop-sls/src/main/assemblies/sls.xml

@@ -0,0 +1,55 @@
+<!--
+  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.
+-->
+<assembly>
+  <id>sls</id>
+  <formats>
+    <format>dir</format>
+    <format>tar.gz</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+
+  <fileSets>
+    <fileSet>
+      <directory>${basedir}/src/main/bin</directory>
+      <outputDirectory>bin</outputDirectory>
+      <fileMode>0755</fileMode>
+    </fileSet>
+    <fileSet>
+      <directory>${basedir}/src/main/data</directory>
+      <outputDirectory>sample-data</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${basedir}/src/main/html</directory>
+      <outputDirectory>html</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${basedir}/src/main/sample-conf</directory>
+      <outputDirectory>sample-conf</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>/lib</outputDirectory>
+      <unpack>false</unpack>
+      <scope>compile</scope>
+      <useProjectArtifact>true</useProjectArtifact>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>

+ 106 - 0
hadoop-tools/hadoop-sls/src/main/bin/rumen2sls.sh

@@ -0,0 +1,106 @@
+#!/bin/bash
+#
+#  Licensed 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. See accompanying LICENSE file.
+#
+
+###############################################################################
+printUsage() {
+  echo "Usage: rumen2sls.sh <OPTIONS>"
+  echo "                 --rumen-file=<RUMEN_FILE>"
+  echo "                 --output-dir=<SLS_OUTPUT_DIR>"
+  echo "                 [--output-prefix=<PREFIX>] (default is sls)"
+  echo
+}
+###############################################################################
+parseArgs() {
+  for i in $*
+  do
+    case $i in
+    --rumen-file=*)
+      rumenfile=${i#*=}
+      ;;
+    --output-dir=*)
+      outputdir=${i#*=}
+      ;;
+    --output-prefix=*)
+      outputprefix=${i#*=}
+      ;;
+    *)
+      echo "Invalid option"
+      echo
+      printUsage
+      exit 1
+      ;;
+    esac
+  done
+  if [[ "${rumenfile}" == "" || "${outputdir}" == "" ]] ; then
+    echo "Both --rumen-file ${rumenfile} and --output-dir \
+          ${outputfdir} must be specified"
+    echo
+    printUsage
+    exit 1
+  fi
+}
+###############################################################################
+calculateBasedir() {
+  # resolve links - $0 may be a softlink
+  PRG="${1}"
+
+  while [ -h "${PRG}" ]; do
+    ls=`ls -ld "${PRG}"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG=`dirname "${PRG}"`/"$link"
+    fi
+  done
+
+  BASEDIR=`dirname ${PRG}`
+  BASEDIR=`cd ${BASEDIR}/..;pwd`
+}
+###############################################################################
+calculateClasspath() {
+  HADOOP_BASE=`which hadoop`
+  HADOOP_BASE=`dirname $HADOOP_BASE`
+  DEFAULT_LIBEXEC_DIR=${HADOOP_BASE}/../libexec
+  HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
+  . $HADOOP_LIBEXEC_DIR/hadoop-config.sh
+  export HADOOP_CLASSPATH="${HADOOP_CLASSPATH}:${TOOL_PATH}"
+}
+###############################################################################
+runSLSGenerator() {
+  if [[ "${outputprefix}" == "" ]] ; then
+    outputprefix="sls"
+  fi
+
+  slsJobs=${outputdir}/${outputprefix}-jobs.json
+  slsNodes=${outputdir}/${outputprefix}-nodes.json
+
+  args="-input ${rumenfile} -outputJobs ${slsJobs}";
+  args="${args} -outputNodes ${slsNodes}";
+
+  hadoop org.apache.hadoop.yarn.sls.RumenToSLSConverter ${args}
+}
+###############################################################################
+
+calculateBasedir $0
+calculateClasspath
+parseArgs "$@"
+runSLSGenerator
+
+echo
+echo "SLS simulation files available at: ${outputdir}"
+echo
+
+exit 0

+ 112 - 0
hadoop-tools/hadoop-sls/src/main/bin/slsrun.sh

@@ -0,0 +1,112 @@
+#!/bin/bash
+#
+#  Licensed 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. See accompanying LICENSE file.
+#
+
+###############################################################################
+printUsage() {
+  echo "Usage: slsrun.sh <OPTIONS>"
+  echo "                 --input-rumen|--input-sls=<FILE1,FILE2,...>"
+  echo "                 --output-dir=<SLS_SIMULATION_OUTPUT_DIRECTORY>"
+  echo "                 [--nodes=<SLS_NODES_FILE>]"
+  echo "                 [--track-jobs=<JOBID1,JOBID2,...>]"
+  echo "                 [--print-simulation]"
+  echo                  
+}
+###############################################################################
+parseArgs() {
+  for i in $*
+  do
+    case $i in
+    --input-rumen=*)
+      inputrumen=${i#*=}
+      ;;
+    --input-sls=*)
+      inputsls=${i#*=}
+      ;;
+    --output-dir=*)
+      outputdir=${i#*=}
+      ;;
+    --nodes=*)
+      nodes=${i#*=}
+      ;;
+    --track-jobs=*)
+      trackjobs=${i#*=}
+      ;;
+    --print-simulation)
+      printsimulation="true"
+      ;;
+    *)
+      echo "Invalid option"
+      echo
+      printUsage
+      exit 1
+      ;;
+    esac
+  done
+
+  if [[ "${inputrumen}" == "" && "${inputsls}" == "" ]] ; then
+    echo "Either --input-rumen or --input-sls must be specified"
+    echo
+    printUsage
+    exit 1
+  fi
+
+  if [[ "${outputdir}" == "" ]] ; then
+    echo "The output directory --output-dir must be specified"
+    echo
+    printUsage
+    exit 1
+  fi
+}
+
+###############################################################################
+calculateClasspath() {
+  HADOOP_BASE=`which hadoop`
+  HADOOP_BASE=`dirname $HADOOP_BASE`
+  DEFAULT_LIBEXEC_DIR=${HADOOP_BASE}/../libexec
+  HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
+  . $HADOOP_LIBEXEC_DIR/hadoop-config.sh
+  export HADOOP_CLASSPATH="${HADOOP_CLASSPATH}:${TOOL_PATH}:html"
+}
+###############################################################################
+runSimulation() {
+  if [[ "${inputsls}" == "" ]] ; then
+    args="-inputrumen ${inputrumen}"
+  else
+    args="-inputsls ${inputsls}"
+  fi
+
+  args="${args} -output ${outputdir}"
+
+  if [[ "${nodes}" != "" ]] ; then
+    args="${args} -nodes ${nodes}"
+  fi
+  
+  if [[ "${trackjobs}" != "" ]] ; then
+    args="${args} -trackjobs ${trackjobs}"
+  fi
+  
+  if [[ "${printsimulation}" == "true" ]] ; then
+    args="${args} -printsimulation"
+  fi
+
+  hadoop org.apache.hadoop.yarn.sls.SLSRunner ${args}
+}
+###############################################################################
+
+calculateClasspath
+parseArgs "$@"
+runSimulation
+
+exit 0

+ 10229 - 0
hadoop-tools/hadoop-sls/src/main/data/2jobs2min-rumen-jh.json

@@ -0,0 +1,10229 @@
+{
+  "priority" : "NORMAL",
+  "jobID" : "job_1369942127770_1205",
+  "user" : "jenkins",
+  "jobName" : "TeraGen",
+  "submitTime" : 1371222054499,
+  "finishTime" : 1371222153874,
+  "queue" : "sls_queue_1",
+  "mapTasks" : [ {
+    "startTime" : 1371222059053,
+    "taskID" : "task_1369942127770_1205_m_000000",
+    "taskType" : "MAP",
+    "finishTime" : 1371222078206,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222061163,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222078206,
+      "attemptID" : "attempt_1369942127770_1205_m_000000_0",
+      "clockSplits" : [ 1481, 1481, 1481, 1481, 1481, 1481, 1169, 1064, 1064, 1173, 1197, 2485 ],
+      "cpuUsages" : [ 1253, 1254, 1254, 1254, 1254, 1254, 1198, 1180, 1179, 984, 942, 1294 ],
+      "vmemKbytes" : [ 113886, 341661, 569436, 797210, 1024985, 1252759, 1416845, 1424087, 1424088, 1424088, 1424087, 1424088 ],
+      "physMemKbytes" : [ 24766, 74299, 123833, 173366, 222900, 272433, 308230, 310197, 310604, 309580, 305826, 302119 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 82,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14300,
+        "virtualMemoryUsage" : 1458266112,
+        "physicalMemoryUsage" : 308215808,
+        "heapUsage" : 745406464
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 82,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059055,
+    "taskID" : "task_1369942127770_1205_m_000001",
+    "taskType" : "MAP",
+    "finishTime" : 1371222076092,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222061164,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222076092,
+      "attemptID" : "attempt_1369942127770_1205_m_000001_0",
+      "clockSplits" : [ 1621, 1621, 1622, 1621, 1622, 1457, 908, 908, 908, 2328, 150, 151 ],
+      "cpuUsages" : [ 1306, 1307, 1307, 1306, 1307, 1264, 1119, 1119, 1119, 1020, 993, 993 ],
+      "vmemKbytes" : [ 122129, 366389, 610648, 854907, 1099167, 1336974, 1409412, 1409411, 1409412, 1409412, 1409411, 1409412 ],
+      "physMemKbytes" : [ 27010, 81032, 135053, 189074, 243096, 295613, 309560, 306611, 303663, 300925, 298639, 296368 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 85,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14160,
+        "virtualMemoryUsage" : 1443237888,
+        "physicalMemoryUsage" : 302317568,
+        "heapUsage" : 745209856
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 85,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059055,
+    "taskID" : "task_1369942127770_1205_m_000002",
+    "taskType" : "MAP",
+    "finishTime" : 1371222076916,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222061159,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222076916,
+      "attemptID" : "attempt_1369942127770_1205_m_000002_0",
+      "clockSplits" : [ 1529, 1530, 1530, 1530, 1529, 1530, 1072, 975, 975, 2938, 269, 269 ],
+      "cpuUsages" : [ 1266, 1266, 1267, 1266, 1267, 1266, 1172, 1152, 1151, 1056, 995, 996 ],
+      "vmemKbytes" : [ 115166, 345498, 575831, 806163, 1036496, 1266828, 1418750, 1422271, 1422272, 1422272, 1422271, 1422272 ],
+      "physMemKbytes" : [ 25182, 75547, 125913, 176278, 226644, 277009, 311047, 314183, 316587, 318060, 315880, 313328 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 85,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14260,
+        "virtualMemoryUsage" : 1456406528,
+        "physicalMemoryUsage" : 319447040,
+        "heapUsage" : 740294656
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 85,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059055,
+    "taskID" : "task_1369942127770_1205_m_000003",
+    "taskType" : "MAP",
+    "finishTime" : 1371222078156,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222061160,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222078156,
+      "attemptID" : "attempt_1369942127770_1205_m_000003_0",
+      "clockSplits" : [ 1473, 1473, 1473, 1473, 1474, 1473, 1250, 1064, 1065, 2986, 293, 294 ],
+      "cpuUsages" : [ 1227, 1227, 1227, 1227, 1227, 1228, 1214, 1202, 1203, 1076, 966, 966 ],
+      "vmemKbytes" : [ 111579, 334737, 557896, 781055, 1004214, 1227373, 1417243, 1440219, 1440220, 1440220, 1440219, 1440220 ],
+      "physMemKbytes" : [ 24240, 72721, 121202, 169683, 218165, 266646, 308296, 315697, 318384, 320500, 319654, 318383 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 85,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14300,
+        "virtualMemoryUsage" : 1474785280,
+        "physicalMemoryUsage" : 325296128,
+        "heapUsage" : 744161280
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 85,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059056,
+    "taskID" : "task_1369942127770_1205_m_000004",
+    "taskType" : "MAP",
+    "finishTime" : 1371222077984,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222061161,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222077984,
+      "attemptID" : "attempt_1369942127770_1205_m_000004_0",
+      "clockSplits" : [ 1441, 1441, 1441, 1441, 1441, 1441, 1297, 1139, 1139, 3202, 106, 107 ],
+      "cpuUsages" : [ 1231, 1231, 1231, 1231, 1231, 1231, 1241, 1253, 1252, 1018, 920, 920 ],
+      "vmemKbytes" : [ 110202, 330607, 551012, 771417, 991823, 1212228, 1407542, 1437667, 1437668, 1437668, 1437667, 1437668 ],
+      "physMemKbytes" : [ 23865, 71596, 119328, 167059, 214790, 262521, 305059, 313396, 315497, 316328, 313564, 310583 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 85,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14350,
+        "virtualMemoryUsage" : 1472172032,
+        "physicalMemoryUsage" : 316485632,
+        "heapUsage" : 740163584
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 85,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059056,
+    "taskID" : "task_1369942127770_1205_m_000005",
+    "taskType" : "MAP",
+    "finishTime" : 1371222078263,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222061161,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222078263,
+      "attemptID" : "attempt_1369942127770_1205_m_000005_0",
+      "clockSplits" : [ 1467, 1467, 1467, 1467, 1468, 1467, 1222, 1044, 1043, 3239, 138, 138 ],
+      "cpuUsages" : [ 1228, 1229, 1228, 1229, 1229, 1228, 1187, 1157, 1157, 1036, 951, 951 ],
+      "vmemKbytes" : [ 109716, 329150, 548584, 768017, 987451, 1206884, 1389627, 1409139, 1409140, 1409140, 1409139, 1409140 ],
+      "physMemKbytes" : [ 24267, 72802, 121338, 169873, 218408, 266943, 307379, 311778, 311871, 311950, 311973, 311991 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14290,
+        "virtualMemoryUsage" : 1442959360,
+        "physicalMemoryUsage" : 319471616,
+        "heapUsage" : 732299264
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059056,
+    "taskID" : "task_1369942127770_1205_m_000006",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080381,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222061165,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080381,
+      "attemptID" : "attempt_1369942127770_1205_m_000006_0",
+      "clockSplits" : [ 2346, 2347, 2347, 2347, 1888, 1412, 1285, 962, 962, 962, 1936, 416 ],
+      "cpuUsages" : [ 1386, 1386, 1386, 1386, 1216, 1041, 1052, 1082, 1082, 1081, 1185, 1217 ],
+      "vmemKbytes" : [ 157018, 471054, 785090, 1099125, 1375327, 1416027, 1416046, 1416396, 1416871, 1417345, 1417679, 1417692 ],
+      "physMemKbytes" : [ 32211, 96633, 161055, 225476, 282302, 291840, 293174, 293917, 294444, 294970, 293975, 289481 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14500,
+        "virtualMemoryUsage" : 1451716608,
+        "physicalMemoryUsage" : 294055936,
+        "heapUsage" : 740032512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059057,
+    "taskID" : "task_1369942127770_1205_m_000007",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080174,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222061168,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080174,
+      "attemptID" : "attempt_1369942127770_1205_m_000007_0",
+      "clockSplits" : [ 1912, 1913, 1913, 1913, 1913, 1395, 1079, 1080, 1110, 1121, 1122, 2528 ],
+      "cpuUsages" : [ 1309, 1309, 1309, 1309, 1309, 1145, 1046, 1045, 1004, 988, 989, 1278 ],
+      "vmemKbytes" : [ 133705, 401116, 668527, 935938, 1203349, 1418939, 1437988, 1437987, 1437988, 1437988, 1437987, 1437988 ],
+      "physMemKbytes" : [ 29116, 87350, 145583, 203816, 262051, 309017, 313251, 313344, 312660, 309967, 307170, 305234 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14040,
+        "virtualMemoryUsage" : 1472499712,
+        "physicalMemoryUsage" : 312479744,
+        "heapUsage" : 723451904
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059057,
+    "taskID" : "task_1369942127770_1205_m_000008",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080738,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222061150,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080738,
+      "attemptID" : "attempt_1369942127770_1205_m_000008_0",
+      "clockSplits" : [ 2192, 2193, 2192, 2193, 2192, 1226, 1140, 1210, 1721, 2853, 235, 236 ],
+      "cpuUsages" : [ 1340, 1340, 1340, 1341, 1340, 1169, 1153, 1147, 1096, 1086, 1059, 1059 ],
+      "vmemKbytes" : [ 140265, 420795, 701325, 981854, 1262385, 1424418, 1425336, 1425335, 1425336, 1425336, 1425335, 1425336 ],
+      "physMemKbytes" : [ 29311, 87935, 146559, 205182, 263807, 298779, 301592, 304203, 305246, 305221, 304062, 302477 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14470,
+        "virtualMemoryUsage" : 1459544064,
+        "physicalMemoryUsage" : 308924416,
+        "heapUsage" : 742719488
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059057,
+    "taskID" : "task_1369942127770_1205_m_000009",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080294,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222061167,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080294,
+      "attemptID" : "attempt_1369942127770_1205_m_000009_0",
+      "clockSplits" : [ 2681, 2682, 2682, 2682, 931, 900, 900, 1034, 1187, 1187, 1891, 364 ],
+      "cpuUsages" : [ 1476, 1476, 1476, 1476, 1162, 1156, 1157, 1127, 1092, 1093, 1116, 1123 ],
+      "vmemKbytes" : [ 176827, 530481, 884136, 1237790, 1420639, 1420691, 1420692, 1420691, 1420692, 1420692, 1420691, 1420692 ],
+      "physMemKbytes" : [ 38211, 114635, 191059, 267482, 307826, 309555, 311274, 312396, 309356, 305514, 301727, 298067 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14930,
+        "virtualMemoryUsage" : 1454788608,
+        "physicalMemoryUsage" : 303349760,
+        "heapUsage" : 740229120
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059058,
+    "taskID" : "task_1369942127770_1205_m_000010",
+    "taskType" : "MAP",
+    "finishTime" : 1371222079719,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222061175,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222079719,
+      "attemptID" : "attempt_1369942127770_1205_m_000010_0",
+      "clockSplits" : [ 3057, 3058, 3057, 1958, 885, 884, 885, 835, 833, 832, 1597, 655 ],
+      "cpuUsages" : [ 1654, 1654, 1654, 1336, 1024, 1025, 1024, 1025, 1025, 1025, 1040, 1124 ],
+      "vmemKbytes" : [ 201676, 605031, 1008386, 1360094, 1409336, 1409383, 1409432, 1409459, 1409460, 1409460, 1409459, 1409460 ],
+      "physMemKbytes" : [ 44104, 132313, 220523, 297458, 308371, 308546, 308722, 308946, 309231, 309516, 309798, 309880 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14610,
+        "virtualMemoryUsage" : 1443287040,
+        "physicalMemoryUsage" : 317300736,
+        "heapUsage" : 740556800
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059058,
+    "taskID" : "task_1369942127770_1205_m_000011",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080741,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222061174,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080741,
+      "attemptID" : "attempt_1369942127770_1205_m_000011_0",
+      "clockSplits" : [ 2091, 2091, 2092, 2091, 2092, 1144, 1117, 1175, 1617, 3521, 265, 266 ],
+      "cpuUsages" : [ 1356, 1356, 1356, 1356, 1356, 1094, 1087, 1096, 1172, 1157, 1062, 1062 ],
+      "vmemKbytes" : [ 141112, 423336, 705560, 987783, 1270008, 1419228, 1419348, 1419347, 1419348, 1419348, 1419347, 1419348 ],
+      "physMemKbytes" : [ 30717, 92154, 153590, 215025, 276462, 309084, 309404, 309697, 309866, 309922, 307623, 303864 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14510,
+        "virtualMemoryUsage" : 1453412352,
+        "physicalMemoryUsage" : 309231616,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059058,
+    "taskID" : "task_1369942127770_1205_m_000012",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080631,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222061173,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080631,
+      "attemptID" : "attempt_1369942127770_1205_m_000012_0",
+      "clockSplits" : [ 2152, 2152, 2152, 2152, 2152, 1134, 1107, 1143, 1402, 1403, 2199, 298 ],
+      "cpuUsages" : [ 1365, 1365, 1365, 1365, 1366, 1024, 1015, 1026, 1101, 1102, 1136, 1140 ],
+      "vmemKbytes" : [ 140246, 420739, 701232, 981725, 1262218, 1409325, 1409412, 1409411, 1409412, 1409412, 1409411, 1409412 ],
+      "physMemKbytes" : [ 29429, 88287, 147145, 206002, 264861, 296705, 298774, 300812, 301651, 301721, 300159, 296175 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14370,
+        "virtualMemoryUsage" : 1443237888,
+        "physicalMemoryUsage" : 301232128,
+        "heapUsage" : 745209856
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059059,
+    "taskID" : "task_1369942127770_1205_m_000013",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080047,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222061177,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080047,
+      "attemptID" : "attempt_1369942127770_1205_m_000013_0",
+      "clockSplits" : [ 2415, 2415, 2416, 2415, 1669, 929, 929, 927, 906, 905, 906, 2031 ],
+      "cpuUsages" : [ 1582, 1583, 1583, 1583, 1323, 1064, 1064, 1052, 899, 899, 899, 1289 ],
+      "vmemKbytes" : [ 156678, 470034, 783390, 1096746, 1370593, 1409423, 1409424, 1409423, 1409424, 1409424, 1409423, 1409424 ],
+      "physMemKbytes" : [ 33111, 99335, 165559, 231782, 289734, 298476, 299089, 299699, 299882, 299738, 299593, 299448 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14820,
+        "virtualMemoryUsage" : 1443250176,
+        "physicalMemoryUsage" : 306561024,
+        "heapUsage" : 740622336
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059060,
+    "taskID" : "task_1369942127770_1205_m_000014",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080403,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222061182,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080403,
+      "attemptID" : "attempt_1369942127770_1205_m_000014_0",
+      "clockSplits" : [ 2246, 2247, 2247, 2246, 1771, 975, 975, 1058, 1672, 3290, 244, 244 ],
+      "cpuUsages" : [ 1482, 1483, 1483, 1483, 1333, 1082, 1081, 1076, 1036, 1050, 1095, 1096 ],
+      "vmemKbytes" : [ 153262, 459788, 766314, 1072839, 1357907, 1417931, 1417932, 1417931, 1417932, 1417932, 1417931, 1417932 ],
+      "physMemKbytes" : [ 32426, 97279, 162133, 226986, 287711, 305142, 311027, 316866, 318854, 318343, 317108, 315553 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14780,
+        "virtualMemoryUsage" : 1451962368,
+        "physicalMemoryUsage" : 322330624,
+        "heapUsage" : 668336128
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059060,
+    "taskID" : "task_1369942127770_1205_m_000015",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080385,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222061182,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080385,
+      "attemptID" : "attempt_1369942127770_1205_m_000015_0",
+      "clockSplits" : [ 2112, 2113, 2112, 2113, 2112, 1311, 1311, 1686, 1973, 1973, 191, 191 ],
+      "cpuUsages" : [ 1520, 1520, 1521, 1520, 1520, 1067, 1068, 1204, 1311, 863, 843, 843 ],
+      "vmemKbytes" : [ 142431, 427293, 712156, 997018, 1281881, 1423875, 1423876, 1423875, 1423876, 1423876, 1423875, 1423876 ],
+      "physMemKbytes" : [ 31512, 94536, 157561, 220586, 283611, 315540, 316563, 317494, 317993, 317677, 316454, 315229 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14800,
+        "virtualMemoryUsage" : 1458049024,
+        "physicalMemoryUsage" : 322166784,
+        "heapUsage" : 663617536
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059060,
+    "taskID" : "task_1369942127770_1205_m_000016",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080314,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222061183,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080314,
+      "attemptID" : "attempt_1369942127770_1205_m_000016_0",
+      "clockSplits" : [ 2331, 2332, 2332, 2332, 1845, 1142, 1143, 1145, 1148, 1148, 1817, 406 ],
+      "cpuUsages" : [ 1376, 1377, 1377, 1377, 1290, 1165, 1165, 1121, 1081, 1082, 1000, 979 ],
+      "vmemKbytes" : [ 154918, 464754, 774590, 1084425, 1368248, 1422215, 1422216, 1422215, 1422216, 1422216, 1422215, 1422216 ],
+      "physMemKbytes" : [ 31161, 93486, 155811, 218135, 275753, 291774, 298030, 303393, 303746, 303320, 303009, 302957 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14390,
+        "virtualMemoryUsage" : 1456349184,
+        "physicalMemoryUsage" : 310206464,
+        "heapUsage" : 663683072
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059061,
+    "taskID" : "task_1369942127770_1205_m_000017",
+    "taskType" : "MAP",
+    "finishTime" : 1371222079863,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222061183,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222079863,
+      "attemptID" : "attempt_1369942127770_1205_m_000017_0",
+      "clockSplits" : [ 2120, 2120, 2121, 2120, 2120, 1291, 1115, 1115, 847, 837, 837, 2031 ],
+      "cpuUsages" : [ 1314, 1314, 1314, 1314, 1314, 1108, 1065, 1065, 889, 882, 882, 1289 ],
+      "vmemKbytes" : [ 136175, 408526, 680878, 953229, 1225581, 1405242, 1409412, 1409411, 1409412, 1409412, 1409411, 1409412 ],
+      "physMemKbytes" : [ 25452, 76356, 127261, 178166, 229071, 262663, 263476, 263509, 263661, 263953, 264244, 264609 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13750,
+        "virtualMemoryUsage" : 1443237888,
+        "physicalMemoryUsage" : 271626240,
+        "heapUsage" : 592183296
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059061,
+    "taskID" : "task_1369942127770_1205_m_000018",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080024,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222061180,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080024,
+      "attemptID" : "attempt_1369942127770_1205_m_000018_0",
+      "clockSplits" : [ 2373, 2374, 2374, 2373, 1909, 925, 926, 925, 890, 882, 882, 2005 ],
+      "cpuUsages" : [ 1613, 1614, 1613, 1614, 1458, 1128, 1127, 1128, 917, 876, 876, 1256 ],
+      "vmemKbytes" : [ 151697, 455092, 758487, 1061882, 1349627, 1419523, 1419524, 1419523, 1419524, 1419524, 1419523, 1419524 ],
+      "physMemKbytes" : [ 30652, 91958, 153263, 214568, 272912, 290016, 293889, 297762, 300019, 299336, 298590, 297860 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 15220,
+        "virtualMemoryUsage" : 1453592576,
+        "physicalMemoryUsage" : 304734208,
+        "heapUsage" : 665190400
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059061,
+    "taskID" : "task_1369942127770_1205_m_000019",
+    "taskType" : "MAP",
+    "finishTime" : 1371222081077,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222061181,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222081077,
+      "attemptID" : "attempt_1369942127770_1205_m_000019_0",
+      "clockSplits" : [ 2353, 2354, 2353, 2354, 1929, 1071, 1072, 1395, 2209, 2348, 224, 224 ],
+      "cpuUsages" : [ 1428, 1429, 1429, 1428, 1376, 1271, 1270, 1203, 1037, 908, 890, 891 ],
+      "vmemKbytes" : [ 152162, 456488, 760814, 1065139, 1352750, 1420763, 1420764, 1420763, 1420764, 1420764, 1420763, 1420764 ],
+      "physMemKbytes" : [ 32961, 98884, 164808, 230731, 293309, 311938, 316956, 321727, 322219, 321123, 319983, 318842 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14560,
+        "virtualMemoryUsage" : 1454862336,
+        "physicalMemoryUsage" : 325910528,
+        "heapUsage" : 663552000
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059062,
+    "taskID" : "task_1369942127770_1205_m_000020",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080321,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222061184,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080321,
+      "attemptID" : "attempt_1369942127770_1205_m_000020_0",
+      "clockSplits" : [ 2427, 2428, 2428, 2428, 2102, 1517, 1285, 748, 748, 747, 1610, 664 ],
+      "cpuUsages" : [ 1443, 1443, 1443, 1443, 1389, 1289, 1200, 994, 995, 995, 1024, 1202 ],
+      "vmemKbytes" : [ 153064, 459194, 765324, 1071453, 1357999, 1421147, 1421148, 1421147, 1421148, 1421148, 1421147, 1421148 ],
+      "physMemKbytes" : [ 29737, 89213, 148688, 208163, 263841, 276188, 276277, 276205, 276076, 275947, 275853, 277999 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14860,
+        "virtualMemoryUsage" : 1455255552,
+        "physicalMemoryUsage" : 286453760,
+        "heapUsage" : 616431616
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059062,
+    "taskID" : "task_1369942127770_1205_m_000021",
+    "taskType" : "MAP",
+    "finishTime" : 1371222081794,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222061178,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222081794,
+      "attemptID" : "attempt_1369942127770_1205_m_000021_0",
+      "clockSplits" : [ 2597, 2597, 2597, 2597, 1562, 1164, 1163, 5456, 198, 197, 197, 198 ],
+      "cpuUsages" : [ 1446, 1447, 1447, 1447, 1261, 1190, 1189, 983, 897, 898, 897, 898 ],
+      "vmemKbytes" : [ 164696, 494089, 823482, 1152875, 1396412, 1409139, 1409140, 1409139, 1409140, 1409140, 1409139, 1409140 ],
+      "physMemKbytes" : [ 32676, 98028, 163380, 228731, 280650, 296453, 310265, 319456, 319884, 318033, 316181, 314330 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14060,
+        "virtualMemoryUsage" : 1442959360,
+        "physicalMemoryUsage" : 320843776,
+        "heapUsage" : 656801792
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059062,
+    "taskID" : "task_1369942127770_1205_m_000022",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080729,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222061185,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080729,
+      "attemptID" : "attempt_1369942127770_1205_m_000022_0",
+      "clockSplits" : [ 2144, 2145, 2144, 2145, 2144, 1183, 1111, 1280, 2538, 2355, 174, 175 ],
+      "cpuUsages" : [ 1386, 1387, 1386, 1387, 1386, 1209, 1196, 1179, 1059, 978, 968, 969 ],
+      "vmemKbytes" : [ 140664, 421992, 703320, 984647, 1265976, 1425650, 1426340, 1426339, 1426340, 1426340, 1426339, 1426340 ],
+      "physMemKbytes" : [ 29534, 88604, 147673, 206742, 265812, 300766, 304205, 307483, 308781, 307931, 305761, 303579 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14490,
+        "virtualMemoryUsage" : 1460572160,
+        "physicalMemoryUsage" : 309747712,
+        "heapUsage" : 742064128
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059063,
+    "taskID" : "task_1369942127770_1205_m_000023",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080052,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222061186,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080052,
+      "attemptID" : "attempt_1369942127770_1205_m_000023_0",
+      "clockSplits" : [ 1873, 1874, 1874, 1874, 1874, 1622, 923, 924, 924, 1161, 1185, 2750 ],
+      "cpuUsages" : [ 1302, 1303, 1302, 1303, 1303, 1229, 1028, 1027, 1027, 755, 727, 1274 ],
+      "vmemKbytes" : [ 124166, 372498, 620831, 869164, 1117497, 1357087, 1424104, 1424103, 1424104, 1424104, 1424103, 1424104 ],
+      "physMemKbytes" : [ 26868, 80607, 134345, 188083, 241822, 293671, 308210, 308261, 308313, 307095, 304076, 301141 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13580,
+        "virtualMemoryUsage" : 1458282496,
+        "physicalMemoryUsage" : 307507200,
+        "heapUsage" : 736362496
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059063,
+    "taskID" : "task_1369942127770_1205_m_000024",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080302,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222061188,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080302,
+      "attemptID" : "attempt_1369942127770_1205_m_000024_0",
+      "clockSplits" : [ 2106, 2107, 2107, 2106, 2107, 1429, 1184, 1182, 1159, 1159, 1920, 542 ],
+      "cpuUsages" : [ 1331, 1331, 1332, 1331, 1331, 1174, 1116, 1098, 957, 957, 1087, 1445 ],
+      "vmemKbytes" : [ 134890, 404670, 674451, 944231, 1214012, 1410949, 1420432, 1420431, 1420432, 1420432, 1420431, 1420432 ],
+      "physMemKbytes" : [ 28316, 84948, 141580, 198211, 254844, 296319, 298789, 299283, 299498, 299534, 299556, 299285 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14490,
+        "virtualMemoryUsage" : 1454522368,
+        "physicalMemoryUsage" : 306270208,
+        "heapUsage" : 742981632
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059063,
+    "taskID" : "task_1369942127770_1205_m_000025",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080632,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222061188,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080632,
+      "attemptID" : "attempt_1369942127770_1205_m_000025_0",
+      "clockSplits" : [ 1860, 1860, 1860, 1861, 1860, 1610, 1421, 3187, 3528, 128, 128, 129 ],
+      "cpuUsages" : [ 1300, 1300, 1300, 1300, 1301, 1224, 1167, 1370, 1043, 928, 928, 929 ],
+      "vmemKbytes" : [ 130800, 392403, 654005, 915607, 1177210, 1396290, 1420456, 1420455, 1420456, 1420456, 1420455, 1420456 ],
+      "physMemKbytes" : [ 29090, 87270, 145451, 203632, 261813, 309693, 310356, 306542, 311703, 310079, 308271, 306464 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14090,
+        "virtualMemoryUsage" : 1454546944,
+        "physicalMemoryUsage" : 312893440,
+        "heapUsage" : 737214464
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059063,
+    "taskID" : "task_1369942127770_1205_m_000026",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080672,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222061191,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080672,
+      "attemptID" : "attempt_1369942127770_1205_m_000026_0",
+      "clockSplits" : [ 2007, 2007, 2008, 2007, 2007, 1238, 1132, 1218, 1845, 3515, 225, 225 ],
+      "cpuUsages" : [ 1331, 1332, 1332, 1332, 1332, 1209, 1192, 1188, 1165, 1134, 1096, 1097 ],
+      "vmemKbytes" : [ 137621, 412863, 688106, 963348, 1238591, 1407402, 1409404, 1409403, 1409404, 1409404, 1409403, 1409404 ],
+      "physMemKbytes" : [ 30191, 90575, 150959, 211342, 271726, 307874, 306038, 303761, 302896, 302808, 301704, 300384 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14740,
+        "virtualMemoryUsage" : 1443229696,
+        "physicalMemoryUsage" : 306917376,
+        "heapUsage" : 740360192
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059064,
+    "taskID" : "task_1369942127770_1205_m_000027",
+    "taskType" : "MAP",
+    "finishTime" : 1371222081541,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222061193,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222081541,
+      "attemptID" : "attempt_1369942127770_1205_m_000027_0",
+      "clockSplits" : [ 1920, 1921, 1921, 1920, 1921, 1430, 1280, 3682, 1168, 780, 780, 1620 ],
+      "cpuUsages" : [ 1362, 1362, 1362, 1362, 1363, 1239, 1201, 1547, 995, 930, 929, 1238 ],
+      "vmemKbytes" : [ 137700, 413102, 688504, 963905, 1239308, 1433933, 1441480, 1441479, 1441480, 1441480, 1441479, 1441480 ],
+      "physMemKbytes" : [ 29565, 88698, 147830, 206962, 266095, 308482, 312089, 314493, 316975, 315186, 313383, 311581 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14890,
+        "virtualMemoryUsage" : 1476075520,
+        "physicalMemoryUsage" : 318078976,
+        "heapUsage" : 740425728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059064,
+    "taskID" : "task_1369942127770_1205_m_000028",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080630,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222061190,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080630,
+      "attemptID" : "attempt_1369942127770_1205_m_000028_0",
+      "clockSplits" : [ 2031, 2031, 2032, 2031, 2032, 1270, 1145, 1198, 1543, 3690, 212, 213 ],
+      "cpuUsages" : [ 1318, 1318, 1319, 1318, 1318, 1074, 1032, 1028, 997, 1001, 1033, 1034 ],
+      "vmemKbytes" : [ 138260, 414780, 691301, 967821, 1244342, 1419237, 1422052, 1422051, 1422052, 1422052, 1422051, 1422052 ],
+      "physMemKbytes" : [ 29586, 88758, 147930, 207102, 266275, 304866, 308604, 311744, 312930, 312923, 312015, 310530 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13790,
+        "virtualMemoryUsage" : 1456181248,
+        "physicalMemoryUsage" : 317222912,
+        "heapUsage" : 744620032
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059064,
+    "taskID" : "task_1369942127770_1205_m_000029",
+    "taskType" : "MAP",
+    "finishTime" : 1371222080196,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222061192,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222080196,
+      "attemptID" : "attempt_1369942127770_1205_m_000029_0",
+      "clockSplits" : [ 2041, 2041, 2042, 2041, 2041, 1432, 1199, 1193, 1146, 1147, 2130, 545 ],
+      "cpuUsages" : [ 1372, 1372, 1372, 1373, 1372, 1165, 1087, 1080, 1032, 1033, 1054, 1088 ],
+      "vmemKbytes" : [ 135224, 405672, 676121, 946570, 1217019, 1416578, 1426876, 1426875, 1426876, 1426876, 1426875, 1426876 ],
+      "physMemKbytes" : [ 28101, 84303, 140506, 196709, 252912, 295457, 301536, 305584, 305557, 302915, 300478, 299963 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14400,
+        "virtualMemoryUsage" : 1461121024,
+        "physicalMemoryUsage" : 307138560,
+        "heapUsage" : 740556800
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059065,
+    "taskID" : "task_1369942127770_1205_m_000030",
+    "taskType" : "MAP",
+    "finishTime" : 1371222095399,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222077057,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222095399,
+      "attemptID" : "attempt_1369942127770_1205_m_000030_0",
+      "clockSplits" : [ 2140, 2140, 2140, 2140, 1862, 1004, 1003, 984, 822, 822, 822, 2455 ],
+      "cpuUsages" : [ 1207, 1207, 1207, 1207, 1120, 851, 851, 857, 906, 905, 906, 1366 ],
+      "vmemKbytes" : [ 149343, 448029, 746716, 1045403, 1335142, 1420323, 1420324, 1420323, 1420324, 1420324, 1420323, 1420324 ],
+      "physMemKbytes" : [ 31929, 95787, 159645, 223502, 285438, 303417, 303091, 302749, 300865, 297952, 295038, 292244 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12590,
+        "virtualMemoryUsage" : 1454411776,
+        "physicalMemoryUsage" : 298463232,
+        "heapUsage" : 728760320
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059065,
+    "taskID" : "task_1369942127770_1205_m_000031",
+    "taskType" : "MAP",
+    "finishTime" : 1371222101752,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222078069,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222101752,
+      "attemptID" : "attempt_1369942127770_1205_m_000031_0",
+      "clockSplits" : [ 2274, 2274, 2274, 2274, 3454, 978, 978, 1034, 1463, 1462, 2573, 529 ],
+      "cpuUsages" : [ 1334, 1334, 1334, 1335, 1214, 1033, 1033, 1023, 944, 943, 1021, 1022 ],
+      "vmemKbytes" : [ 179277, 537833, 896388, 1254943, 1440327, 1440379, 1440380, 1440379, 1440380, 1440380, 1440379, 1440380 ],
+      "physMemKbytes" : [ 38140, 114421, 190703, 266984, 306533, 307559, 308886, 310183, 308915, 305992, 304523, 304521 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13810,
+        "virtualMemoryUsage" : 1474949120,
+        "physicalMemoryUsage" : 315183104,
+        "heapUsage" : 728956928
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059065,
+    "taskID" : "task_1369942127770_1205_m_000032",
+    "taskType" : "MAP",
+    "finishTime" : 1371222102468,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222080073,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222102468,
+      "attemptID" : "attempt_1369942127770_1205_m_000032_0",
+      "clockSplits" : [ 2030, 2030, 2031, 2030, 1666, 982, 982, 1072, 1743, 1650, 1476, 4204 ],
+      "cpuUsages" : [ 1109, 1109, 1109, 1110, 1120, 1139, 1140, 1119, 972, 937, 873, 1313 ],
+      "vmemKbytes" : [ 153120, 459362, 765604, 1071845, 1359504, 1424519, 1424520, 1424519, 1424520, 1424520, 1424519, 1424520 ],
+      "physMemKbytes" : [ 32822, 98466, 164110, 229754, 291374, 304780, 304107, 303437, 303182, 302954, 299856, 296038 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13420,
+        "virtualMemoryUsage" : 1458708480,
+        "physicalMemoryUsage" : 307167232,
+        "heapUsage" : 728825856
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059065,
+    "taskID" : "task_1369942127770_1205_m_000033",
+    "taskType" : "MAP",
+    "finishTime" : 1371222101998,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222080074,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222101998,
+      "attemptID" : "attempt_1369942127770_1205_m_000033_0",
+      "clockSplits" : [ 2253, 2254, 2254, 2254, 1075, 1055, 1055, 1607, 1658, 1287, 1210, 3957 ],
+      "cpuUsages" : [ 1286, 1287, 1287, 1287, 1060, 1056, 1056, 1356, 1385, 1130, 1076, 1364 ],
+      "vmemKbytes" : [ 176727, 530182, 883638, 1237093, 1419839, 1419891, 1419892, 1419891, 1419892, 1419892, 1419891, 1419892 ],
+      "physMemKbytes" : [ 34968, 104906, 174844, 244781, 281486, 282625, 283754, 284431, 284483, 285884, 289832, 293683 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14630,
+        "virtualMemoryUsage" : 1453969408,
+        "physicalMemoryUsage" : 301670400,
+        "heapUsage" : 677380096
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059066,
+    "taskID" : "task_1369942127770_1205_m_000034",
+    "taskType" : "MAP",
+    "finishTime" : 1371222102416,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222080074,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222102416,
+      "attemptID" : "attempt_1369942127770_1205_m_000034_0",
+      "clockSplits" : [ 2608, 2609, 2608, 2609, 1753, 770, 771, 770, 856, 994, 994, 3824 ],
+      "cpuUsages" : [ 1296, 1297, 1296, 1297, 1205, 1099, 1098, 1099, 1020, 889, 890, 1044 ],
+      "vmemKbytes" : [ 158696, 476089, 793483, 1110876, 1393919, 1439299, 1439300, 1439299, 1439300, 1439300, 1439299, 1439300 ],
+      "physMemKbytes" : [ 34127, 102381, 170635, 238889, 299969, 311412, 313378, 315343, 317033, 315889, 314000, 312155 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13820,
+        "virtualMemoryUsage" : 1473843200,
+        "physicalMemoryUsage" : 319066112,
+        "heapUsage" : 740556800
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059066,
+    "taskID" : "task_1369942127770_1205_m_000035",
+    "taskType" : "MAP",
+    "finishTime" : 1371222102415,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222081100,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222102415,
+      "attemptID" : "attempt_1369942127770_1205_m_000035_0",
+      "clockSplits" : [ 4636, 4637, 1169, 1033, 1033, 670, 655, 655, 655, 3321, 143, 143 ],
+      "cpuUsages" : [ 1717, 1718, 1013, 985, 986, 885, 881, 881, 881, 908, 1012, 1013 ],
+      "vmemKbytes" : [ 348902, 1046707, 1421400, 1421895, 1421896, 1421895, 1421896, 1421895, 1421896, 1421896, 1421895, 1421896 ],
+      "physMemKbytes" : [ 71074, 213222, 292772, 299823, 306780, 310573, 310648, 310717, 310786, 310854, 310865, 310851 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13200,
+        "virtualMemoryUsage" : 1456021504,
+        "physicalMemoryUsage" : 318390272,
+        "heapUsage" : 731447296
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059066,
+    "taskID" : "task_1369942127770_1205_m_000036",
+    "taskType" : "MAP",
+    "finishTime" : 1371222125169,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222081101,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222125169,
+      "attemptID" : "attempt_1369942127770_1205_m_000036_0",
+      "clockSplits" : [ 6230, 3745, 1243, 1242, 1250, 1249, 1335, 1441, 1332, 1024, 1024, 22949 ],
+      "cpuUsages" : [ 2117, 1566, 1010, 1011, 961, 960, 1002, 1055, 988, 801, 801, 1438 ],
+      "vmemKbytes" : [ 474617, 1306098, 1425656, 1425655, 1425656, 1425655, 1425656, 1425655, 1425656, 1425656, 1425655, 1425656 ],
+      "physMemKbytes" : [ 88814, 246089, 280314, 293875, 300976, 301213, 301436, 301555, 301570, 299938, 297659, 295692 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13710,
+        "virtualMemoryUsage" : 1459871744,
+        "physicalMemoryUsage" : 303833088,
+        "heapUsage" : 727973888
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059067,
+    "taskID" : "task_1369942127770_1205_m_000037",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103766,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222081107,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103766,
+      "attemptID" : "attempt_1369942127770_1205_m_000037_0",
+      "clockSplits" : [ 5242, 4571, 1409, 1409, 1234, 1232, 1096, 946, 945, 2922, 485, 485 ],
+      "cpuUsages" : [ 1863, 1705, 964, 963, 1018, 1018, 961, 896, 896, 892, 877, 877 ],
+      "vmemKbytes" : [ 390265, 1158821, 1424332, 1424331, 1424332, 1424331, 1424332, 1424331, 1424332, 1424332, 1424331, 1424332 ],
+      "physMemKbytes" : [ 77364, 229859, 288579, 297802, 302713, 303041, 303341, 303445, 303514, 303521, 301077, 297356 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13440,
+        "virtualMemoryUsage" : 1458515968,
+        "physicalMemoryUsage" : 303296512,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059067,
+    "taskID" : "task_1369942127770_1205_m_000038",
+    "taskType" : "MAP",
+    "finishTime" : 1371222102985,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222081108,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222102985,
+      "attemptID" : "attempt_1369942127770_1205_m_000038_0",
+      "clockSplits" : [ 3604, 3605, 2556, 894, 894, 894, 1661, 1683, 801, 800, 800, 3680 ],
+      "cpuUsages" : [ 1519, 1519, 1354, 1093, 1093, 1093, 1206, 1172, 767, 766, 766, 1152 ],
+      "vmemKbytes" : [ 269653, 808959, 1307904, 1409271, 1409272, 1409271, 1409272, 1409271, 1409272, 1409272, 1409271, 1409272 ],
+      "physMemKbytes" : [ 56075, 168226, 272040, 293728, 294479, 295228, 297304, 301666, 302286, 300462, 298637, 296864 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13500,
+        "virtualMemoryUsage" : 1443094528,
+        "physicalMemoryUsage" : 303415296,
+        "heapUsage" : 734986240
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059067,
+    "taskID" : "task_1369942127770_1205_m_000039",
+    "taskType" : "MAP",
+    "finishTime" : 1371222102412,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222081122,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222102412,
+      "attemptID" : "attempt_1369942127770_1205_m_000039_0",
+      "clockSplits" : [ 2243, 2243, 2243, 2243, 1297, 1281, 1209, 1149, 1148, 1142, 1139, 1139 ],
+      "cpuUsages" : [ 1346, 1347, 1347, 1346, 1136, 1131, 1212, 1279, 1278, 996, 906, 906 ],
+      "vmemKbytes" : [ 176693, 530079, 883466, 1236853, 1419563, 1419615, 1419616, 1419615, 1419616, 1419616, 1419615, 1419616 ],
+      "physMemKbytes" : [ 38075, 114226, 190377, 266528, 305978, 306151, 306399, 307073, 307808, 308344, 308411, 308460 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14520,
+        "virtualMemoryUsage" : 1453686784,
+        "physicalMemoryUsage" : 315822080,
+        "heapUsage" : 732823552
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059068,
+    "taskID" : "task_1369942127770_1205_m_000040",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103554,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222081118,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103554,
+      "attemptID" : "attempt_1369942127770_1205_m_000040_0",
+      "clockSplits" : [ 4372, 4372, 2703, 1678, 1229, 1040, 1041, 902, 737, 738, 738, 2881 ],
+      "cpuUsages" : [ 1756, 1756, 1411, 1200, 1199, 1198, 1199, 1027, 823, 823, 823, 1025 ],
+      "vmemKbytes" : [ 298429, 895288, 1377502, 1420639, 1420640, 1420639, 1420640, 1420639, 1420640, 1420640, 1420639, 1420640 ],
+      "physMemKbytes" : [ 58537, 175611, 270284, 279159, 280291, 283392, 286616, 290044, 294932, 300108, 305284, 310287 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14240,
+        "virtualMemoryUsage" : 1454735360,
+        "physicalMemoryUsage" : 319156224,
+        "heapUsage" : 678690816
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059068,
+    "taskID" : "task_1369942127770_1205_m_000041",
+    "taskType" : "MAP",
+    "finishTime" : 1371222101748,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222081109,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222101748,
+      "attemptID" : "attempt_1369942127770_1205_m_000041_0",
+      "clockSplits" : [ 3312, 3313, 3219, 801, 802, 802, 802, 889, 889, 889, 2693, 837 ],
+      "cpuUsages" : [ 1508, 1509, 1490, 985, 985, 985, 986, 1108, 1109, 1108, 971, 846 ],
+      "vmemKbytes" : [ 242835, 728505, 1213832, 1438767, 1438768, 1438767, 1438768, 1438767, 1438768, 1438768, 1438767, 1438768 ],
+      "physMemKbytes" : [ 52179, 156537, 260822, 309253, 309436, 309618, 309801, 308717, 306403, 304088, 302092, 301832 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13690,
+        "virtualMemoryUsage" : 1473298432,
+        "physicalMemoryUsage" : 309014528,
+        "heapUsage" : 723976192
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059068,
+    "taskID" : "task_1369942127770_1205_m_000042",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103767,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222081119,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103767,
+      "attemptID" : "attempt_1369942127770_1205_m_000042_0",
+      "clockSplits" : [ 3561, 3561, 3262, 2606, 888, 859, 859, 1003, 1314, 1315, 3006, 196 ],
+      "cpuUsages" : [ 1552, 1552, 1459, 1255, 1134, 1133, 1132, 1045, 857, 857, 789, 785 ],
+      "vmemKbytes" : [ 267994, 803983, 1313613, 1439867, 1439868, 1439867, 1439868, 1439867, 1439868, 1439868, 1439867, 1439868 ],
+      "physMemKbytes" : [ 57155, 171467, 280300, 309448, 311589, 312912, 314235, 315324, 313077, 309747, 307880, 307877 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13740,
+        "virtualMemoryUsage" : 1474424832,
+        "physicalMemoryUsage" : 318595072,
+        "heapUsage" : 723779584
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059068,
+    "taskID" : "task_1369942127770_1205_m_000043",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103881,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222081121,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103881,
+      "attemptID" : "attempt_1369942127770_1205_m_000043_0",
+      "clockSplits" : [ 3716, 3716, 2909, 1143, 1144, 1262, 1372, 1465, 1825, 3631, 197, 197 ],
+      "cpuUsages" : [ 1623, 1623, 1461, 1106, 1107, 1215, 1316, 1250, 988, 939, 886, 886 ],
+      "vmemKbytes" : [ 262336, 787009, 1285817, 1409271, 1409272, 1409271, 1409272, 1409271, 1409272, 1409272, 1409271, 1409272 ],
+      "physMemKbytes" : [ 54165, 162495, 265672, 294053, 297834, 301158, 301963, 302374, 302514, 302198, 299793, 297016 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14500,
+        "virtualMemoryUsage" : 1443094528,
+        "physicalMemoryUsage" : 302665728,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059069,
+    "taskID" : "task_1369942127770_1205_m_000044",
+    "taskType" : "MAP",
+    "finishTime" : 1371222102868,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222081121,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222102868,
+      "attemptID" : "attempt_1369942127770_1205_m_000044_0",
+      "clockSplits" : [ 3420, 3421, 2683, 1617, 1400, 1158, 1158, 3301, 2885, 154, 154, 155 ],
+      "cpuUsages" : [ 1443, 1443, 1405, 1350, 1224, 1085, 1085, 1191, 924, 903, 903, 904 ],
+      "vmemKbytes" : [ 271947, 815841, 1314315, 1409403, 1409404, 1409403, 1409404, 1409403, 1409404, 1409404, 1409403, 1409404 ],
+      "physMemKbytes" : [ 56476, 169428, 273297, 296495, 300225, 300941, 301104, 302318, 304696, 304473, 304240, 304008 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13940,
+        "virtualMemoryUsage" : 1443229696,
+        "physicalMemoryUsage" : 311136256,
+        "heapUsage" : 740360192
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059069,
+    "taskID" : "task_1369942127770_1205_m_000045",
+    "taskType" : "MAP",
+    "finishTime" : 1371222127471,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222081121,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222127471,
+      "attemptID" : "attempt_1369942127770_1205_m_000045_0",
+      "clockSplits" : [ 4495, 4496, 1624, 1019, 1020, 1151, 1211, 1978, 28975, 125, 125, 125 ],
+      "cpuUsages" : [ 1757, 1757, 1255, 1150, 1150, 1108, 1090, 1085, 1209, 816, 816, 817 ],
+      "vmemKbytes" : [ 326114, 978343, 1408153, 1418043, 1418044, 1418043, 1418044, 1418043, 1418044, 1418044, 1418043, 1418044 ],
+      "physMemKbytes" : [ 67381, 202144, 292944, 300742, 306585, 311066, 311413, 311477, 311272, 310097, 308858, 307619 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14010,
+        "virtualMemoryUsage" : 1452077056,
+        "physicalMemoryUsage" : 314368000,
+        "heapUsage" : 721223680
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059069,
+    "taskID" : "task_1369942127770_1205_m_000046",
+    "taskType" : "MAP",
+    "finishTime" : 1371222124895,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222082113,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222124895,
+      "attemptID" : "attempt_1369942127770_1205_m_000046_0",
+      "clockSplits" : [ 3256, 3257, 3256, 3257, 1592, 889, 889, 867, 781, 782, 781, 23168 ],
+      "cpuUsages" : [ 1366, 1366, 1366, 1366, 1331, 1318, 1318, 1230, 906, 907, 906, 1320 ],
+      "vmemKbytes" : [ 165057, 495172, 825288, 1155403, 1403989, 1418567, 1418568, 1418567, 1418568, 1418568, 1418567, 1418568 ],
+      "physMemKbytes" : [ 30439, 91319, 152199, 213078, 259370, 263787, 265596, 267636, 276563, 288702, 300841, 312600 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14700,
+        "virtualMemoryUsage" : 1452613632,
+        "physicalMemoryUsage" : 323588096,
+        "heapUsage" : 675282944
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059070,
+    "taskID" : "task_1369942127770_1205_m_000047",
+    "taskType" : "MAP",
+    "finishTime" : 1371222102985,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222082114,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222102985,
+      "attemptID" : "attempt_1369942127770_1205_m_000047_0",
+      "clockSplits" : [ 4299, 4300, 2006, 1431, 1084, 884, 883, 874, 802, 802, 802, 2699 ],
+      "cpuUsages" : [ 1763, 1763, 1335, 1228, 1182, 1155, 1156, 1116, 822, 822, 822, 1126 ],
+      "vmemKbytes" : [ 320229, 960687, 1396409, 1409271, 1409272, 1409271, 1409272, 1409271, 1409272, 1409272, 1409271, 1409272 ],
+      "physMemKbytes" : [ 63258, 189774, 277972, 287030, 292846, 295605, 298083, 300529, 300299, 298352, 296405, 294521 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14290,
+        "virtualMemoryUsage" : 1443094528,
+        "physicalMemoryUsage" : 301035520,
+        "heapUsage" : 724041728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059070,
+    "taskID" : "task_1369942127770_1205_m_000048",
+    "taskType" : "MAP",
+    "finishTime" : 1371222102897,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222082113,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222102897,
+      "attemptID" : "attempt_1369942127770_1205_m_000048_0",
+      "clockSplits" : [ 2803, 2803, 2804, 1930, 902, 901, 902, 3220, 799, 798, 799, 2118 ],
+      "cpuUsages" : [ 1423, 1423, 1424, 1233, 1010, 1009, 1009, 1396, 817, 818, 817, 1261 ],
+      "vmemKbytes" : [ 199009, 597028, 995047, 1351087, 1409272, 1409271, 1409272, 1409271, 1409272, 1409272, 1409271, 1409272 ],
+      "physMemKbytes" : [ 43013, 129039, 215066, 291871, 303240, 301826, 300413, 299727, 299138, 298063, 296988, 296589 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13640,
+        "virtualMemoryUsage" : 1443094528,
+        "physicalMemoryUsage" : 307924992,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059070,
+    "taskID" : "task_1369942127770_1205_m_000049",
+    "taskType" : "MAP",
+    "finishTime" : 1371222129137,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222082116,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222129137,
+      "attemptID" : "attempt_1369942127770_1205_m_000049_0",
+      "clockSplits" : [ 2860, 2861, 2861, 2861, 1894, 1005, 1005, 7694, 5464, 5464, 5464, 7263 ],
+      "cpuUsages" : [ 1406, 1406, 1407, 1406, 1267, 1138, 1137, 1367, 736, 735, 736, 1109 ],
+      "vmemKbytes" : [ 160162, 480486, 800810, 1121133, 1398054, 1434867, 1434868, 1434867, 1434868, 1434868, 1434867, 1434868 ],
+      "physMemKbytes" : [ 30785, 92356, 153927, 215498, 269221, 279523, 283170, 286860, 294606, 304983, 315359, 325403 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13910,
+        "virtualMemoryUsage" : 1469304832,
+        "physicalMemoryUsage" : 336125952,
+        "heapUsage" : 675872768
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059071,
+    "taskID" : "task_1369942127770_1205_m_000050",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103702,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222082115,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103702,
+      "attemptID" : "attempt_1369942127770_1205_m_000050_0",
+      "clockSplits" : [ 3070, 3071, 3071, 3030, 1063, 1064, 1063, 981, 981, 980, 2531, 678 ],
+      "cpuUsages" : [ 1472, 1472, 1473, 1465, 1137, 1137, 1136, 1360, 1362, 1361, 920, 815 ],
+      "vmemKbytes" : [ 177976, 533928, 889881, 1245762, 1416656, 1416655, 1416656, 1416913, 1417437, 1417960, 1418314, 1418324 ],
+      "physMemKbytes" : [ 34783, 104349, 173916, 243470, 282136, 292267, 302399, 307271, 306752, 306233, 305870, 305826 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 15110,
+        "virtualMemoryUsage" : 1452363776,
+        "physicalMemoryUsage" : 313147392,
+        "heapUsage" : 663683072
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059071,
+    "taskID" : "task_1369942127770_1205_m_000051",
+    "taskType" : "MAP",
+    "finishTime" : 1371222114762,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222082116,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222114762,
+      "attemptID" : "attempt_1369942127770_1205_m_000051_0",
+      "clockSplits" : [ 2776, 2776, 2776, 2776, 2052, 1135, 1135, 15865, 337, 337, 337, 337 ],
+      "cpuUsages" : [ 1381, 1382, 1382, 1382, 1259, 1102, 1103, 1505, 806, 806, 806, 806 ],
+      "vmemKbytes" : [ 157661, 472983, 788305, 1103627, 1388243, 1437451, 1437452, 1437451, 1437452, 1437452, 1437451, 1437452 ],
+      "physMemKbytes" : [ 32208, 96626, 161044, 225461, 284440, 301714, 310271, 317790, 318550, 317867, 317184, 316501 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13720,
+        "virtualMemoryUsage" : 1471950848,
+        "physicalMemoryUsage" : 323747840,
+        "heapUsage" : 657391616
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059071,
+    "taskID" : "task_1369942127770_1205_m_000052",
+    "taskType" : "MAP",
+    "finishTime" : 1371222116084,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222082115,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222116084,
+      "attemptID" : "attempt_1369942127770_1205_m_000052_0",
+      "clockSplits" : [ 3007, 3008, 3007, 3008, 1568, 1223, 1222, 15532, 596, 597, 597, 597 ],
+      "cpuUsages" : [ 1507, 1507, 1507, 1507, 1238, 1175, 1174, 1321, 776, 776, 776, 776 ],
+      "vmemKbytes" : [ 169124, 507373, 845623, 1183872, 1412160, 1418503, 1418504, 1418503, 1418504, 1418504, 1418503, 1418504 ],
+      "physMemKbytes" : [ 32359, 97079, 161798, 226517, 275030, 290830, 305697, 313100, 310842, 308599, 306356, 304113 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14040,
+        "virtualMemoryUsage" : 1452548096,
+        "physicalMemoryUsage" : 310263808,
+        "heapUsage" : 656736256
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059071,
+    "taskID" : "task_1369942127770_1205_m_000053",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103694,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222083110,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103694,
+      "attemptID" : "attempt_1369942127770_1205_m_000053_0",
+      "clockSplits" : [ 2723, 2724, 2723, 2724, 1401, 1380, 987, 720, 719, 720, 2336, 1346 ],
+      "cpuUsages" : [ 1461, 1462, 1462, 1462, 1176, 1172, 1031, 936, 935, 935, 957, 1051 ],
+      "vmemKbytes" : [ 176884, 530654, 884423, 1238192, 1420450, 1420491, 1420492, 1420491, 1420492, 1420492, 1420491, 1420492 ],
+      "physMemKbytes" : [ 38706, 116120, 193534, 270947, 310895, 311037, 311316, 312193, 313137, 314081, 315011, 315367 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14100,
+        "virtualMemoryUsage" : 1454583808,
+        "physicalMemoryUsage" : 322899968,
+        "heapUsage" : 742457344
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059072,
+    "taskID" : "task_1369942127770_1205_m_000054",
+    "taskType" : "MAP",
+    "finishTime" : 1371222127757,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222083125,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222127757,
+      "attemptID" : "attempt_1369942127770_1205_m_000054_0",
+      "clockSplits" : [ 3770, 3770, 3350, 1454, 1455, 1119, 1113, 4738, 5863, 5864, 5864, 5864 ],
+      "cpuUsages" : [ 1933, 1934, 1782, 1099, 1099, 1086, 1086, 1152, 789, 790, 790, 790 ],
+      "vmemKbytes" : [ 255816, 767448, 1270616, 1440657, 1438670, 1437636, 1437636, 1437623, 1436443, 1434504, 1432565, 1430626 ],
+      "physMemKbytes" : [ 53820, 161460, 267313, 302807, 301966, 303414, 307344, 311222, 310193, 305969, 301744, 297520 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14690,
+        "virtualMemoryUsage" : 1463967744,
+        "physicalMemoryUsage" : 302465024,
+        "heapUsage" : 742260736
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059072,
+    "taskID" : "task_1369942127770_1205_m_000055",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103714,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222083112,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103714,
+      "attemptID" : "attempt_1369942127770_1205_m_000055_0",
+      "clockSplits" : [ 2702, 2702, 2702, 2702, 1233, 1210, 1258, 1338, 3529, 268, 268, 268 ],
+      "cpuUsages" : [ 1441, 1442, 1442, 1442, 1145, 1140, 1151, 1168, 1147, 810, 811, 811 ],
+      "vmemKbytes" : [ 178795, 536385, 893975, 1251564, 1434355, 1431439, 1428693, 1428123, 1428124, 1428124, 1428123, 1428124 ],
+      "physMemKbytes" : [ 38002, 114007, 190012, 266017, 303836, 301085, 298665, 299727, 301696, 301927, 300774, 299621 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14200,
+        "virtualMemoryUsage" : 1462398976,
+        "physicalMemoryUsage" : 306319360,
+        "heapUsage" : 740425728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059072,
+    "taskID" : "task_1369942127770_1205_m_000056",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103849,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222083165,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103849,
+      "attemptID" : "attempt_1369942127770_1205_m_000056_0",
+      "clockSplits" : [ 1942, 1942, 1942, 1943, 1942, 1815, 1471, 1602, 2567, 3041, 158, 159 ],
+      "cpuUsages" : [ 1364, 1365, 1365, 1365, 1365, 1347, 1296, 1278, 1135, 891, 864, 865 ],
+      "vmemKbytes" : [ 125438, 376316, 627194, 878071, 1128949, 1370541, 1435402, 1432859, 1428772, 1425767, 1425743, 1425744 ],
+      "physMemKbytes" : [ 26942, 80826, 134711, 188595, 242480, 294459, 310173, 312011, 309654, 305607, 303001, 300406 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14590,
+        "virtualMemoryUsage" : 1459961856,
+        "physicalMemoryUsage" : 306216960,
+        "heapUsage" : 742785024
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059073,
+    "taskID" : "task_1369942127770_1205_m_000057",
+    "taskType" : "MAP",
+    "finishTime" : 1371222103712,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222083127,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222103712,
+      "attemptID" : "attempt_1369942127770_1205_m_000057_0",
+      "clockSplits" : [ 2428, 2429, 2428, 2429, 2428, 1847, 997, 998, 1005, 1021, 1022, 1546 ],
+      "cpuUsages" : [ 1364, 1364, 1364, 1364, 1364, 1191, 938, 938, 886, 752, 753, 1142 ],
+      "vmemKbytes" : [ 128472, 385419, 642365, 899311, 1156258, 1391627, 1433817, 1430184, 1426697, 1425764, 1425763, 1425764 ],
+      "physMemKbytes" : [ 27860, 83580, 139301, 195021, 250742, 301700, 310016, 308217, 306366, 303606, 300513, 297518 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13420,
+        "virtualMemoryUsage" : 1459982336,
+        "physicalMemoryUsage" : 303755264,
+        "heapUsage" : 744357888
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059073,
+    "taskID" : "task_1369942127770_1205_m_000058",
+    "taskType" : "MAP",
+    "finishTime" : 1371222122471,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222083128,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222122471,
+      "attemptID" : "attempt_1369942127770_1205_m_000058_0",
+      "clockSplits" : [ 2490, 2490, 2491, 2338, 1678, 1612, 1441, 24272, 130, 131, 130, 131 ],
+      "cpuUsages" : [ 1390, 1390, 1390, 1352, 1192, 1144, 1016, 1333, 848, 848, 848, 849 ],
+      "vmemKbytes" : [ 184824, 554474, 924124, 1287306, 1409448, 1409447, 1409448, 1409447, 1409448, 1409448, 1409447, 1409448 ],
+      "physMemKbytes" : [ 39675, 119026, 198377, 276344, 302719, 302849, 301090, 298636, 297427, 296963, 296499, 296036 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13600,
+        "virtualMemoryUsage" : 1443274752,
+        "physicalMemoryUsage" : 302903296,
+        "heapUsage" : 718929920
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059073,
+    "taskID" : "task_1369942127770_1205_m_000059",
+    "taskType" : "MAP",
+    "finishTime" : 1371222124673,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222083120,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222124673,
+      "attemptID" : "attempt_1369942127770_1205_m_000059_0",
+      "clockSplits" : [ 2762, 2762, 2763, 2762, 1265, 1242, 1113, 964, 964, 1098, 1562, 22290 ],
+      "cpuUsages" : [ 1534, 1534, 1534, 1534, 1104, 1098, 1078, 1053, 1054, 977, 714, 1136 ],
+      "vmemKbytes" : [ 178607, 535821, 893035, 1250249, 1432998, 1430391, 1428024, 1427639, 1427640, 1427640, 1427639, 1427640 ],
+      "physMemKbytes" : [ 34082, 102247, 170412, 238577, 281383, 297244, 311441, 313974, 314247, 314480, 313649, 312382 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14350,
+        "virtualMemoryUsage" : 1461903360,
+        "physicalMemoryUsage" : 319496192,
+        "heapUsage" : 663027712
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059073,
+    "taskID" : "task_1369942127770_1205_m_000060",
+    "taskType" : "MAP",
+    "finishTime" : 1371222116128,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222097139,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222116128,
+      "attemptID" : "attempt_1369942127770_1205_m_000060_0",
+      "clockSplits" : [ 1500, 1501, 1500, 1501, 1500, 1501, 1487, 1433, 1426, 1113, 1114, 3407 ],
+      "cpuUsages" : [ 1038, 1039, 1038, 1039, 1038, 1039, 1025, 968, 966, 874, 873, 1403 ],
+      "vmemKbytes" : [ 105321, 315966, 526611, 737256, 947901, 1158545, 1365245, 1432246, 1429737, 1428540, 1428539, 1428540 ],
+      "physMemKbytes" : [ 22420, 67262, 112104, 156945, 201787, 246628, 290619, 304477, 303341, 301354, 298591, 295908 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12340,
+        "virtualMemoryUsage" : 1462824960,
+        "physicalMemoryUsage" : 302157824,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059074,
+    "taskID" : "task_1369942127770_1205_m_000061",
+    "taskType" : "MAP",
+    "finishTime" : 1371222116509,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222103155,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222116509,
+      "attemptID" : "attempt_1369942127770_1205_m_000061_0",
+      "clockSplits" : [ 1102, 1103, 1103, 1103, 1102, 1103, 1103, 1103, 1105, 1105, 2090, 227 ],
+      "cpuUsages" : [ 1023, 1024, 1023, 1024, 1024, 1023, 1024, 998, 914, 913, 1030, 1230 ],
+      "vmemKbytes" : [ 91613, 274839, 458066, 641293, 824520, 1007746, 1190973, 1369212, 1423060, 1423060, 1423059, 1423060 ],
+      "physMemKbytes" : [ 19978, 59934, 99891, 139848, 179805, 219762, 259719, 298545, 309145, 307525, 306010, 305645 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12250,
+        "virtualMemoryUsage" : 1457213440,
+        "physicalMemoryUsage" : 312954880,
+        "heapUsage" : 724041728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059074,
+    "taskID" : "task_1369942127770_1205_m_000062",
+    "taskType" : "MAP",
+    "finishTime" : 1371222120045,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222103156,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222120045,
+      "attemptID" : "attempt_1369942127770_1205_m_000062_0",
+      "clockSplits" : [ 1830, 1830, 1831, 1830, 1519, 770, 770, 769, 812, 1065, 1065, 2792 ],
+      "cpuUsages" : [ 1251, 1252, 1251, 1252, 1189, 1038, 1037, 1038, 1015, 876, 875, 1306 ],
+      "vmemKbytes" : [ 149737, 449211, 748686, 1048161, 1334683, 1409291, 1409292, 1409291, 1409292, 1409292, 1409291, 1409292 ],
+      "physMemKbytes" : [ 32142, 96428, 160713, 224998, 286484, 302152, 301689, 301225, 300738, 298783, 295954, 293214 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13380,
+        "virtualMemoryUsage" : 1443115008,
+        "physicalMemoryUsage" : 299433984,
+        "heapUsage" : 723779584
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059074,
+    "taskID" : "task_1369942127770_1205_m_000063",
+    "taskType" : "MAP",
+    "finishTime" : 1371222117644,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222103154,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222117644,
+      "attemptID" : "attempt_1369942127770_1205_m_000063_0",
+      "clockSplits" : [ 1249, 1250, 1250, 1249, 1250, 1250, 1298, 1478, 4009, 67, 67, 67 ],
+      "cpuUsages" : [ 1103, 1103, 1103, 1104, 1103, 1103, 1096, 1068, 1060, 989, 989, 989 ],
+      "vmemKbytes" : [ 104541, 313625, 522708, 731791, 940876, 1149959, 1354370, 1419379, 1419380, 1419380, 1419379, 1419380 ],
+      "physMemKbytes" : [ 22813, 68439, 114065, 159690, 205317, 250942, 295600, 311369, 313657, 314573, 314492, 314412 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12810,
+        "virtualMemoryUsage" : 1453445120,
+        "physicalMemoryUsage" : 321916928,
+        "heapUsage" : 728825856
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059075,
+    "taskID" : "task_1369942127770_1205_m_000064",
+    "taskType" : "MAP",
+    "finishTime" : 1371222117257,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222103156,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222117257,
+      "attemptID" : "attempt_1369942127770_1205_m_000064_0",
+      "clockSplits" : [ 1141, 1141, 1142, 1141, 1142, 1141, 1142, 1624, 2159, 1884, 219, 220 ],
+      "cpuUsages" : [ 1100, 1100, 1101, 1100, 1100, 1101, 1100, 1111, 1123, 880, 877, 877 ],
+      "vmemKbytes" : [ 95516, 286549, 477582, 668615, 859648, 1050681, 1241715, 1411172, 1437472, 1437472, 1437471, 1437472 ],
+      "physMemKbytes" : [ 20537, 61611, 102686, 143760, 184835, 225910, 266985, 303753, 311949, 312235, 309723, 307212 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12570,
+        "virtualMemoryUsage" : 1471971328,
+        "physicalMemoryUsage" : 313298944,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059075,
+    "taskID" : "task_1369942127770_1205_m_000065",
+    "taskType" : "MAP",
+    "finishTime" : 1371222142884,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222103154,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222142884,
+      "attemptID" : "attempt_1369942127770_1205_m_000065_0",
+      "clockSplits" : [ 6846, 6847, 6846, 6847, 6846, 1331, 720, 720, 720, 1574, 213, 214 ],
+      "cpuUsages" : [ 1068, 1069, 1069, 1068, 1069, 823, 795, 795, 796, 814, 827, 827 ],
+      "vmemKbytes" : [ 138171, 414514, 690857, 967200, 1243543, 1407908, 1409284, 1409283, 1409284, 1409284, 1409283, 1409284 ],
+      "physMemKbytes" : [ 27592, 82777, 137962, 193147, 248333, 280961, 280755, 280271, 279788, 279136, 277800, 276389 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11020,
+        "virtualMemoryUsage" : 1443106816,
+        "physicalMemoryUsage" : 282300416,
+        "heapUsage" : 606863360
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059075,
+    "taskID" : "task_1369942127770_1205_m_000066",
+    "taskType" : "MAP",
+    "finishTime" : 1371222118279,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222104206,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222118279,
+      "attemptID" : "attempt_1369942127770_1205_m_000066_0",
+      "clockSplits" : [ 1309, 1310, 1310, 1310, 1309, 1310, 1093, 740, 741, 741, 2689, 206 ],
+      "cpuUsages" : [ 1116, 1117, 1117, 1116, 1117, 1117, 1046, 933, 933, 933, 942, 1113 ],
+      "vmemKbytes" : [ 107292, 321876, 536460, 751043, 965628, 1180211, 1379124, 1420075, 1420076, 1420076, 1420075, 1420076 ],
+      "physMemKbytes" : [ 23107, 69321, 115536, 161750, 207965, 254180, 296965, 305182, 304437, 303692, 302947, 302581 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12600,
+        "virtualMemoryUsage" : 1454157824,
+        "physicalMemoryUsage" : 309813248,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059076,
+    "taskID" : "task_1369942127770_1205_m_000067",
+    "taskType" : "MAP",
+    "finishTime" : 1371222122382,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222104212,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222122382,
+      "attemptID" : "attempt_1369942127770_1205_m_000067_0",
+      "clockSplits" : [ 2306, 2306, 2307, 2306, 969, 948, 949, 1054, 1108, 1109, 2584, 218 ],
+      "cpuUsages" : [ 1454, 1454, 1455, 1454, 1273, 1269, 1270, 991, 848, 848, 1001, 1033 ],
+      "vmemKbytes" : [ 179001, 537003, 895005, 1253007, 1437446, 1437487, 1437488, 1437487, 1437488, 1437488, 1437487, 1437488 ],
+      "physMemKbytes" : [ 37869, 113607, 189345, 265083, 304399, 305018, 305630, 306131, 306267, 306373, 305816, 304030 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14350,
+        "virtualMemoryUsage" : 1471987712,
+        "physicalMemoryUsage" : 310398976,
+        "heapUsage" : 723779584
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059076,
+    "taskID" : "task_1369942127770_1205_m_000068",
+    "taskType" : "MAP",
+    "finishTime" : 1371222139789,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222104213,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222139789,
+      "attemptID" : "attempt_1369942127770_1205_m_000068_0",
+      "clockSplits" : [ 7214, 7215, 7214, 7215, 722, 608, 609, 609, 608, 2851, 158, 158 ],
+      "cpuUsages" : [ 1219, 1220, 1220, 1220, 895, 890, 890, 890, 890, 861, 857, 858 ],
+      "vmemKbytes" : [ 178706, 536118, 893530, 1250942, 1435030, 1433622, 1432162, 1430701, 1429241, 1428318, 1428303, 1428304 ],
+      "physMemKbytes" : [ 33878, 101634, 169390, 237145, 275703, 283011, 290312, 297612, 304913, 309538, 309654, 309698 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12160,
+        "virtualMemoryUsage" : 1462583296,
+        "physicalMemoryUsage" : 317272064,
+        "heapUsage" : 661913600
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059076,
+    "taskID" : "task_1369942127770_1205_m_000069",
+    "taskType" : "MAP",
+    "finishTime" : 1371222117823,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222104211,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222117823,
+      "attemptID" : "attempt_1369942127770_1205_m_000069_0",
+      "clockSplits" : [ 1345, 1346, 1346, 1346, 1345, 1346, 1251, 1080, 1080, 1943, 89, 90 ],
+      "cpuUsages" : [ 1283, 1284, 1284, 1284, 1284, 1284, 1262, 1222, 1222, 1068, 886, 887 ],
+      "vmemKbytes" : [ 107219, 321657, 536096, 750535, 964974, 1179413, 1380249, 1424691, 1424692, 1424692, 1424691, 1424692 ],
+      "physMemKbytes" : [ 23184, 69554, 115924, 162293, 208663, 255032, 298478, 308303, 308574, 308817, 308869, 308884 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14250,
+        "virtualMemoryUsage" : 1458884608,
+        "physicalMemoryUsage" : 316305408,
+        "heapUsage" : 728498176
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059076,
+    "taskID" : "task_1369942127770_1205_m_000070",
+    "taskType" : "MAP",
+    "finishTime" : 1371222120103,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222104209,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222120103,
+      "attemptID" : "attempt_1369942127770_1205_m_000070_0",
+      "clockSplits" : [ 2413, 2414, 2414, 2414, 829, 801, 801, 3485, 79, 80, 79, 80 ],
+      "cpuUsages" : [ 1351, 1352, 1352, 1351, 1086, 1082, 1081, 1047, 792, 792, 792, 792 ],
+      "vmemKbytes" : [ 178427, 535281, 892136, 1248991, 1432584, 1430750, 1428865, 1426991, 1426256, 1426256, 1426255, 1426256 ],
+      "physMemKbytes" : [ 37393, 112181, 186969, 261756, 300169, 299652, 299123, 298584, 297156, 295154, 293151, 291149 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12870,
+        "virtualMemoryUsage" : 1460486144,
+        "physicalMemoryUsage" : 297111552,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059077,
+    "taskID" : "task_1369942127770_1205_m_000071",
+    "taskType" : "MAP",
+    "finishTime" : 1371222116746,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222104212,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222116746,
+      "attemptID" : "attempt_1369942127770_1205_m_000071_0",
+      "clockSplits" : [ 1399, 1400, 1400, 1400, 1400, 1400, 842, 615, 615, 614, 615, 829 ],
+      "cpuUsages" : [ 1079, 1080, 1079, 1080, 1079, 1080, 919, 855, 854, 854, 854, 1127 ],
+      "vmemKbytes" : [ 114375, 343125, 571876, 800626, 1029377, 1258128, 1429156, 1438747, 1438748, 1438748, 1438747, 1438748 ],
+      "physMemKbytes" : [ 24578, 73734, 122891, 172048, 221205, 270361, 306966, 308465, 307878, 307290, 306702, 306207 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11940,
+        "virtualMemoryUsage" : 1473277952,
+        "physicalMemoryUsage" : 313466880,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059077,
+    "taskID" : "task_1369942127770_1205_m_000072",
+    "taskType" : "MAP",
+    "finishTime" : 1371222119279,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222104210,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222119279,
+      "attemptID" : "attempt_1369942127770_1205_m_000072_0",
+      "clockSplits" : [ 1218, 1219, 1219, 1219, 1218, 1219, 1219, 990, 787, 787, 786, 3182 ],
+      "cpuUsages" : [ 1182, 1182, 1182, 1182, 1182, 1182, 1182, 1067, 964, 965, 965, 1145 ],
+      "vmemKbytes" : [ 96309, 288929, 481549, 674168, 866788, 1059407, 1252028, 1417169, 1435861, 1432977, 1430092, 1427627 ],
+      "physMemKbytes" : [ 20607, 61821, 103035, 144249, 185464, 226678, 267893, 302818, 304217, 300676, 297135, 294096 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13380,
+        "virtualMemoryUsage" : 1461575680,
+        "physicalMemoryUsage" : 300732416,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059077,
+    "taskID" : "task_1369942127770_1205_m_000073",
+    "taskType" : "MAP",
+    "finishTime" : 1371222116354,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222105211,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222116354,
+      "attemptID" : "attempt_1369942127770_1205_m_000073_0",
+      "clockSplits" : [ 1066, 1066, 1066, 1066, 1066, 1066, 1066, 3425, 62, 62, 62, 62 ],
+      "cpuUsages" : [ 983, 983, 983, 983, 983, 984, 983, 964, 826, 826, 826, 826 ],
+      "vmemKbytes" : [ 91186, 273558, 455931, 638304, 820677, 1003049, 1185422, 1366539, 1437580, 1437580, 1437579, 1437580 ],
+      "physMemKbytes" : [ 18730, 56190, 93651, 131111, 168572, 206032, 243493, 280753, 300503, 308951, 317398, 325847 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11150,
+        "virtualMemoryUsage" : 1472081920,
+        "physicalMemoryUsage" : 337993728,
+        "heapUsage" : 679804928
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059078,
+    "taskID" : "task_1369942127770_1205_m_000074",
+    "taskType" : "MAP",
+    "finishTime" : 1371222117482,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222105212,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222117482,
+      "attemptID" : "attempt_1369942127770_1205_m_000074_0",
+      "clockSplits" : [ 1130, 1131, 1131, 1131, 1131, 1131, 1130, 1087, 760, 760, 760, 983 ],
+      "cpuUsages" : [ 1122, 1123, 1123, 1123, 1123, 1123, 1123, 1103, 953, 952, 952, 1210 ],
+      "vmemKbytes" : [ 89422, 268266, 447110, 625954, 804799, 983643, 1162488, 1340061, 1409432, 1409432, 1409431, 1409432 ],
+      "physMemKbytes" : [ 19797, 59392, 98988, 138583, 178180, 217775, 257371, 296665, 310308, 307505, 304701, 301898 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13030,
+        "virtualMemoryUsage" : 1443258368,
+        "physicalMemoryUsage" : 307699712,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059078,
+    "taskID" : "task_1369942127770_1205_m_000075",
+    "taskType" : "MAP",
+    "finishTime" : 1371222122401,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222105213,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222122401,
+      "attemptID" : "attempt_1369942127770_1205_m_000075_0",
+      "clockSplits" : [ 1858, 1858, 1858, 1858, 1859, 1408, 1202, 1156, 804, 803, 804, 1715 ],
+      "cpuUsages" : [ 1273, 1274, 1274, 1274, 1274, 1159, 1106, 1069, 800, 799, 799, 1319 ],
+      "vmemKbytes" : [ 133405, 400215, 667026, 933837, 1200648, 1404711, 1417880, 1417879, 1417880, 1417880, 1417879, 1417880 ],
+      "physMemKbytes" : [ 28701, 86104, 143508, 200911, 258315, 302557, 306759, 308178, 307670, 305916, 304161, 302442 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13420,
+        "virtualMemoryUsage" : 1451909120,
+        "physicalMemoryUsage" : 309051392,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059078,
+    "taskID" : "task_1369942127770_1205_m_000076",
+    "taskType" : "MAP",
+    "finishTime" : 1371222122853,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222106215,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222122853,
+      "attemptID" : "attempt_1369942127770_1205_m_000076_0",
+      "clockSplits" : [ 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1741, 4606, 154, 155, 155 ],
+      "cpuUsages" : [ 1148, 1149, 1149, 1149, 1149, 1149, 1149, 1159, 1170, 996, 996, 997 ],
+      "vmemKbytes" : [ 91602, 274808, 458014, 641219, 824426, 1007631, 1190838, 1369307, 1423984, 1423984, 1423983, 1423984 ],
+      "physMemKbytes" : [ 19851, 59554, 99258, 138961, 178666, 218369, 258073, 296821, 310558, 310242, 307937, 305632 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13360,
+        "virtualMemoryUsage" : 1458159616,
+        "physicalMemoryUsage" : 311787520,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059079,
+    "taskID" : "task_1369942127770_1205_m_000077",
+    "taskType" : "MAP",
+    "finishTime" : 1371222123218,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222106215,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222123218,
+      "attemptID" : "attempt_1369942127770_1205_m_000077_0",
+      "clockSplits" : [ 2676, 2677, 2676, 2677, 821, 793, 794, 3489, 97, 97, 97, 97 ],
+      "cpuUsages" : [ 1339, 1340, 1340, 1340, 957, 951, 951, 951, 975, 975, 975, 976 ],
+      "vmemKbytes" : [ 176938, 530815, 884692, 1238569, 1420882, 1420923, 1420924, 1420923, 1420924, 1420924, 1420923, 1420924 ],
+      "physMemKbytes" : [ 38335, 115005, 191676, 268346, 307977, 308255, 308526, 308795, 308516, 307709, 306902, 306095 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13070,
+        "virtualMemoryUsage" : 1455026176,
+        "physicalMemoryUsage" : 313028608,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059079,
+    "taskID" : "task_1369942127770_1205_m_000078",
+    "taskType" : "MAP",
+    "finishTime" : 1371222127755,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222107218,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222127755,
+      "attemptID" : "attempt_1369942127770_1205_m_000078_0",
+      "clockSplits" : [ 2466, 2467, 2466, 2467, 3087, 638, 583, 582, 583, 583, 1609, 3001 ],
+      "cpuUsages" : [ 1319, 1319, 1320, 1319, 1177, 909, 903, 903, 902, 903, 786, 1120 ],
+      "vmemKbytes" : [ 176823, 530469, 884116, 1237762, 1420607, 1420659, 1420660, 1420659, 1420660, 1420660, 1420659, 1420660 ],
+      "physMemKbytes" : [ 37490, 112471, 187452, 262433, 299476, 297339, 296741, 296144, 295547, 294950, 294467, 294436 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12880,
+        "virtualMemoryUsage" : 1454755840,
+        "physicalMemoryUsage" : 301457408,
+        "heapUsage" : 723779584
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059079,
+    "taskID" : "task_1369942127770_1205_m_000079",
+    "taskType" : "MAP",
+    "finishTime" : 1371222127589,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222107220,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222127589,
+      "attemptID" : "attempt_1369942127770_1205_m_000079_0",
+      "clockSplits" : [ 2808, 2809, 2809, 2808, 850, 816, 816, 814, 796, 797, 797, 3445 ],
+      "cpuUsages" : [ 1306, 1307, 1307, 1307, 1048, 1043, 1043, 1018, 839, 838, 838, 1256 ],
+      "vmemKbytes" : [ 179463, 538389, 897316, 1256243, 1441819, 1441871, 1441872, 1441871, 1441872, 1441872, 1441871, 1441872 ],
+      "physMemKbytes" : [ 38683, 116049, 193416, 270783, 311546, 313136, 314715, 316267, 315488, 313213, 310938, 308727 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13150,
+        "virtualMemoryUsage" : 1476476928,
+        "physicalMemoryUsage" : 315416576,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059080,
+    "taskID" : "task_1369942127770_1205_m_000080",
+    "taskType" : "MAP",
+    "finishTime" : 1371222123105,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222107219,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222123105,
+      "attemptID" : "attempt_1369942127770_1205_m_000080_0",
+      "clockSplits" : [ 2261, 2262, 2262, 2262, 2198, 591, 591, 591, 591, 592, 1475, 205 ],
+      "cpuUsages" : [ 1233, 1233, 1234, 1233, 1223, 948, 949, 948, 949, 948, 1055, 1087 ],
+      "vmemKbytes" : [ 142013, 426040, 710068, 994095, 1277915, 1409291, 1409292, 1409291, 1409292, 1409292, 1409291, 1409292 ],
+      "physMemKbytes" : [ 30773, 92321, 153868, 215415, 276919, 305910, 306883, 307856, 308829, 309802, 309923, 308075 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13040,
+        "virtualMemoryUsage" : 1443115008,
+        "physicalMemoryUsage" : 314482688,
+        "heapUsage" : 742129664
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059080,
+    "taskID" : "task_1369942127770_1205_m_000081",
+    "taskType" : "MAP",
+    "finishTime" : 1371222132159,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222116240,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222132159,
+      "attemptID" : "attempt_1369942127770_1205_m_000081_0",
+      "clockSplits" : [ 1059, 1060, 1060, 1060, 1059, 1060, 1060, 1410, 4727, 335, 334, 335 ],
+      "cpuUsages" : [ 1089, 1090, 1090, 1090, 1090, 1090, 1090, 1091, 1008, 847, 847, 848 ],
+      "vmemKbytes" : [ 91426, 274280, 457134, 639987, 822841, 1005694, 1188548, 1370102, 1441028, 1441028, 1441027, 1441028 ],
+      "physMemKbytes" : [ 20740, 62221, 103704, 145185, 186667, 228148, 269631, 310818, 326794, 325251, 323278, 321306 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12430,
+        "virtualMemoryUsage" : 1475612672,
+        "physicalMemoryUsage" : 327917568,
+        "heapUsage" : 657260544
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059080,
+    "taskID" : "task_1369942127770_1205_m_000082",
+    "taskType" : "MAP",
+    "finishTime" : 1371222132250,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222117244,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222132250,
+      "attemptID" : "attempt_1369942127770_1205_m_000082_0",
+      "clockSplits" : [ 1229, 1230, 1230, 1230, 1229, 1230, 1230, 3866, 83, 84, 83, 84 ],
+      "cpuUsages" : [ 1028, 1028, 1028, 1028, 1028, 1028, 1028, 1009, 919, 918, 919, 919 ],
+      "vmemKbytes" : [ 92019, 276058, 460097, 644136, 828175, 1012214, 1196253, 1377655, 1441156, 1441156, 1441155, 1441156 ],
+      "physMemKbytes" : [ 18161, 54484, 90809, 127132, 163456, 199779, 236103, 271895, 283917, 283136, 282355, 281574 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11980,
+        "virtualMemoryUsage" : 1475743744,
+        "physicalMemoryUsage" : 287850496,
+        "heapUsage" : 608370688
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059080,
+    "taskID" : "task_1369942127770_1205_m_000083",
+    "taskType" : "MAP",
+    "finishTime" : 1371222134319,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222117244,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222134319,
+      "attemptID" : "attempt_1369942127770_1205_m_000083_0",
+      "clockSplits" : [ 2126, 2126, 2126, 2126, 842, 820, 819, 813, 783, 783, 783, 2923 ],
+      "cpuUsages" : [ 1199, 1200, 1200, 1200, 934, 930, 930, 909, 816, 816, 816, 1250 ],
+      "vmemKbytes" : [ 178727, 536181, 893635, 1251088, 1434711, 1432295, 1429826, 1427400, 1426584, 1426584, 1426583, 1426584 ],
+      "physMemKbytes" : [ 38394, 115182, 191970, 268758, 307779, 306378, 304967, 303565, 302585, 301819, 301052, 300280 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12200,
+        "virtualMemoryUsage" : 1460822016,
+        "physicalMemoryUsage" : 307064832,
+        "heapUsage" : 734920704
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059081,
+    "taskID" : "task_1369942127770_1205_m_000084",
+    "taskType" : "MAP",
+    "finishTime" : 1371222133861,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222118252,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222133861,
+      "attemptID" : "attempt_1369942127770_1205_m_000084_0",
+      "clockSplits" : [ 2230, 2231, 2231, 2231, 750, 709, 709, 709, 803, 871, 871, 872 ],
+      "cpuUsages" : [ 1179, 1179, 1180, 1179, 1004, 999, 998, 999, 861, 761, 760, 761 ],
+      "vmemKbytes" : [ 178623, 535870, 893117, 1250364, 1438606, 1438739, 1438740, 1438739, 1438740, 1438740, 1438739, 1438740 ],
+      "physMemKbytes" : [ 34739, 104219, 173699, 243178, 279472, 278825, 278153, 277480, 277015, 277474, 278043, 278614 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12480,
+        "virtualMemoryUsage" : 1473269760,
+        "physicalMemoryUsage" : 284733440,
+        "heapUsage" : 601817088
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059081,
+    "taskID" : "task_1369942127770_1205_m_000085",
+    "taskType" : "MAP",
+    "finishTime" : 1371222139704,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222118252,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222139704,
+      "attemptID" : "attempt_1369942127770_1205_m_000085_0",
+      "clockSplits" : [ 3454, 3455, 3455, 3454, 1009, 966, 966, 746, 682, 681, 682, 1895 ],
+      "cpuUsages" : [ 1451, 1451, 1451, 1452, 1056, 1049, 1050, 858, 801, 801, 802, 1128 ],
+      "vmemKbytes" : [ 177565, 532695, 887825, 1242955, 1426567, 1426619, 1426620, 1426619, 1426620, 1426620, 1426619, 1426620 ],
+      "physMemKbytes" : [ 36583, 109749, 182916, 256083, 293999, 294187, 294366, 294292, 293645, 292976, 292306, 291648 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13350,
+        "virtualMemoryUsage" : 1460858880,
+        "physicalMemoryUsage" : 298389504,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059081,
+    "taskID" : "task_1369942127770_1205_m_000086",
+    "taskType" : "MAP",
+    "finishTime" : 1371222136354,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222118251,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222136354,
+      "attemptID" : "attempt_1369942127770_1205_m_000086_0",
+      "clockSplits" : [ 3475, 3475, 3476, 711, 642, 643, 642, 677, 933, 934, 933, 1558 ],
+      "cpuUsages" : [ 1468, 1468, 1468, 1016, 1005, 1005, 1004, 979, 787, 786, 786, 1068 ],
+      "vmemKbytes" : [ 238103, 714311, 1190519, 1438076, 1434027, 1429835, 1425644, 1421481, 1419856, 1419856, 1419855, 1419856 ],
+      "physMemKbytes" : [ 50419, 151257, 252095, 303534, 300615, 297664, 294714, 291769, 289364, 287302, 285239, 283851 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12840,
+        "virtualMemoryUsage" : 1453932544,
+        "physicalMemoryUsage" : 290590720,
+        "heapUsage" : 723451904
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059082,
+    "taskID" : "task_1369942127770_1205_m_000087",
+    "taskType" : "MAP",
+    "finishTime" : 1371222139789,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222118251,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222139789,
+      "attemptID" : "attempt_1369942127770_1205_m_000087_0",
+      "clockSplits" : [ 3491, 3492, 3492, 3492, 853, 807, 807, 806, 796, 796, 796, 1904 ],
+      "cpuUsages" : [ 1371, 1372, 1371, 1372, 1005, 999, 1000, 981, 848, 849, 848, 1114 ],
+      "vmemKbytes" : [ 176529, 529588, 882647, 1235706, 1418247, 1418299, 1418300, 1418299, 1418300, 1418300, 1418299, 1418300 ],
+      "physMemKbytes" : [ 37865, 113597, 189329, 265060, 304618, 305460, 306291, 307107, 306593, 305225, 303856, 302522 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13130,
+        "virtualMemoryUsage" : 1452339200,
+        "physicalMemoryUsage" : 309321728,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059082,
+    "taskID" : "task_1369942127770_1205_m_000088",
+    "taskType" : "MAP",
+    "finishTime" : 1371222136362,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222119253,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222136362,
+      "attemptID" : "attempt_1369942127770_1205_m_000088_0",
+      "clockSplits" : [ 2893, 2894, 2894, 1311, 689, 690, 689, 743, 930, 931, 930, 1511 ],
+      "cpuUsages" : [ 1313, 1313, 1313, 1052, 949, 949, 949, 909, 770, 769, 770, 1204 ],
+      "vmemKbytes" : [ 214687, 644062, 1073437, 1392086, 1409140, 1409139, 1409140, 1409139, 1409140, 1409140, 1409139, 1409140 ],
+      "physMemKbytes" : [ 46097, 138291, 230486, 299182, 303872, 304943, 306014, 307012, 305925, 303888, 301850, 300616 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12260,
+        "virtualMemoryUsage" : 1442959360,
+        "physicalMemoryUsage" : 307785728,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059082,
+    "taskID" : "task_1369942127770_1205_m_000089",
+    "taskType" : "MAP",
+    "finishTime" : 1371222132666,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222119254,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222132666,
+      "attemptID" : "attempt_1369942127770_1205_m_000089_0",
+      "clockSplits" : [ 1524, 1525, 1525, 1525, 1525, 1525, 596, 541, 542, 541, 541, 1496 ],
+      "cpuUsages" : [ 1088, 1088, 1088, 1089, 1088, 1088, 829, 814, 813, 814, 813, 1188 ],
+      "vmemKbytes" : [ 118410, 355230, 592051, 828872, 1065693, 1302514, 1433707, 1434071, 1434072, 1434072, 1434071, 1434072 ],
+      "physMemKbytes" : [ 25455, 76367, 127278, 178189, 229102, 280013, 307852, 307113, 306294, 305475, 304656, 303834 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11800,
+        "virtualMemoryUsage" : 1468489728,
+        "physicalMemoryUsage" : 310685696,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059082,
+    "taskID" : "task_1369942127770_1205_m_000090",
+    "taskType" : "MAP",
+    "finishTime" : 1371222141107,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222119254,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222141107,
+      "attemptID" : "attempt_1369942127770_1205_m_000090_0",
+      "clockSplits" : [ 3299, 3300, 3300, 3300, 1010, 971, 971, 735, 677, 677, 677, 2932 ],
+      "cpuUsages" : [ 1468, 1469, 1469, 1468, 1113, 1106, 1106, 896, 845, 845, 844, 1181 ],
+      "vmemKbytes" : [ 177790, 533371, 888953, 1244534, 1428379, 1428431, 1428432, 1428431, 1428432, 1428432, 1428431, 1428432 ],
+      "physMemKbytes" : [ 36477, 109431, 182386, 255341, 293743, 295167, 296582, 297326, 296690, 296012, 295333, 294667 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13810,
+        "virtualMemoryUsage" : 1462714368,
+        "physicalMemoryUsage" : 301477888,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059083,
+    "taskID" : "task_1369942127770_1205_m_000091",
+    "taskType" : "MAP",
+    "finishTime" : 1371222135965,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222120259,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222135965,
+      "attemptID" : "attempt_1369942127770_1205_m_000091_0",
+      "clockSplits" : [ 1451, 1451, 1451, 1451, 1451, 1451, 1451, 1451, 2873, 208, 208, 208 ],
+      "cpuUsages" : [ 1031, 1032, 1031, 1032, 1031, 1032, 1031, 1032, 875, 811, 811, 811 ],
+      "vmemKbytes" : [ 86236, 258709, 431183, 603656, 776130, 948603, 1121077, 1293550, 1422372, 1429552, 1429551, 1429552 ],
+      "physMemKbytes" : [ 17759, 53278, 88799, 124318, 159839, 195358, 230879, 266398, 292713, 293373, 292518, 291663 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11660,
+        "virtualMemoryUsage" : 1463861248,
+        "physicalMemoryUsage" : 298164224,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059083,
+    "taskID" : "task_1369942127770_1205_m_000092",
+    "taskType" : "MAP",
+    "finishTime" : 1371222141263,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222120260,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222141263,
+      "attemptID" : "attempt_1369942127770_1205_m_000092_0",
+      "clockSplits" : [ 2790, 2790, 2790, 2790, 1207, 1183, 1013, 663, 663, 664, 663, 3419 ],
+      "cpuUsages" : [ 1414, 1415, 1414, 1415, 1063, 1057, 992, 858, 858, 858, 858, 1138 ],
+      "vmemKbytes" : [ 175507, 526522, 877537, 1228552, 1409390, 1409431, 1409432, 1409431, 1409432, 1409432, 1409431, 1409432 ],
+      "physMemKbytes" : [ 37701, 113103, 188506, 263908, 302825, 302979, 303086, 302647, 302037, 301427, 300816, 300337 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13470,
+        "virtualMemoryUsage" : 1443258368,
+        "physicalMemoryUsage" : 307466240,
+        "heapUsage" : 723910656
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222059083,
+    "taskID" : "task_1369942127770_1205_m_000093",
+    "taskType" : "MAP",
+    "finishTime" : 1371222140945,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222121262,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222140945,
+      "attemptID" : "attempt_1369942127770_1205_m_000093_0",
+      "clockSplits" : [ 2364, 2365, 2365, 2365, 2596, 1091, 628, 629, 628, 629, 2831, 383 ],
+      "cpuUsages" : [ 1300, 1300, 1300, 1300, 1207, 990, 924, 925, 924, 925, 887, 878 ],
+      "vmemKbytes" : [ 179076, 537228, 895381, 1253534, 1438050, 1437355, 1434909, 1432392, 1429877, 1427361, 1425627, 1425572 ],
+      "physMemKbytes" : [ 38409, 115228, 192047, 268866, 308684, 308141, 305153, 302065, 298978, 295891, 293745, 293615 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13140,
+        "virtualMemoryUsage" : 1459785728,
+        "physicalMemoryUsage" : 300752896,
+        "heapUsage" : 727515136
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059084,
+    "taskID" : "task_1369942127770_1205_m_000094",
+    "taskType" : "MAP",
+    "finishTime" : 1371222136213,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222122266,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222136213,
+      "attemptID" : "attempt_1369942127770_1205_m_000094_0",
+      "clockSplits" : [ 1233, 1233, 1234, 1233, 1234, 1233, 1233, 762, 671, 672, 672, 2532 ],
+      "cpuUsages" : [ 980, 981, 980, 981, 980, 981, 981, 746, 702, 702, 702, 1204 ],
+      "vmemKbytes" : [ 98416, 295249, 492083, 688916, 885750, 1082583, 1279417, 1406650, 1409140, 1409140, 1409139, 1409140 ],
+      "physMemKbytes" : [ 21848, 65544, 109240, 152936, 196633, 240328, 284025, 311912, 311463, 310448, 309433, 308423 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 10920,
+        "virtualMemoryUsage" : 1442959360,
+        "physicalMemoryUsage" : 315342848,
+        "heapUsage" : 723451904
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222059084,
+    "taskID" : "task_1369942127770_1205_m_000095",
+    "taskType" : "MAP",
+    "finishTime" : 1371222141112,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222123269,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222141112,
+      "attemptID" : "attempt_1369942127770_1205_m_000095_0",
+      "clockSplits" : [ 2087, 2088, 2087, 2088, 2088, 1195, 746, 746, 746, 2974, 245, 246 ],
+      "cpuUsages" : [ 1246, 1246, 1247, 1246, 1247, 1130, 1071, 1071, 1071, 975, 875, 875 ],
+      "vmemKbytes" : [ 132085, 396256, 660427, 924598, 1188769, 1394563, 1409404, 1409403, 1409404, 1409404, 1409403, 1409404 ],
+      "physMemKbytes" : [ 28569, 85709, 142849, 199988, 257129, 301711, 305219, 305534, 305849, 305967, 304859, 303540 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13560,
+        "virtualMemoryUsage" : 1443229696,
+        "physicalMemoryUsage" : 310263808,
+        "heapUsage" : 734920704
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  } ],
+  "reduceTasks" : [ ],
+  "launchTime" : 1371222058937,
+  "totalMaps" : 96,
+  "totalReduces" : 0,
+  "otherTasks" : [ ],
+  "jobProperties" : {
+    "mapreduce.job.ubertask.enable" : "false",
+    "yarn.resourcemanager.max-completed-applications" : "10000",
+    "yarn.resourcemanager.delayed.delegation-token.removal-interval-ms" : "30000",
+    "mapreduce.client.submit.file.replication" : "2",
+    "yarn.nodemanager.container-manager.thread-count" : "20",
+    "mapred.queue.default.acl-administer-jobs" : "*",
+    "dfs.image.transfer.bandwidthPerSec" : "0",
+    "mapreduce.tasktracker.healthchecker.interval" : "60000",
+    "mapreduce.jobtracker.staging.root.dir" : "/user",
+    "yarn.resourcemanager.recovery.enabled" : "false",
+    "yarn.resourcemanager.am.max-retries" : "1",
+    "dfs.block.access.token.lifetime" : "600",
+    "fs.AbstractFileSystem.file.impl" : "org.apache.hadoop.fs.local.LocalFs",
+    "mapreduce.client.completion.pollinterval" : "5000",
+    "mapreduce.job.ubertask.maxreduces" : "1",
+    "mapreduce.reduce.shuffle.memory.limit.percent" : "0.25",
+    "dfs.domain.socket.path" : "/var/run/hdfs-sockets/dn",
+    "hadoop.ssl.keystores.factory.class" : "org.apache.hadoop.security.ssl.FileBasedKeyStoresFactory",
+    "hadoop.http.authentication.kerberos.keytab" : "${user.home}/hadoop.keytab",
+    "yarn.nodemanager.keytab" : "/etc/krb5.keytab",
+    "io.seqfile.sorter.recordlimit" : "1000000",
+    "s3.blocksize" : "67108864",
+    "mapreduce.task.io.sort.factor" : "10",
+    "yarn.nodemanager.disk-health-checker.interval-ms" : "120000",
+    "mapreduce.job.working.dir" : "hdfs://a2115.halxg.cloudera.com:8020/user/jenkins",
+    "yarn.admin.acl" : "*",
+    "mapreduce.job.speculative.speculativecap" : "0.1",
+    "dfs.namenode.num.checkpoints.retained" : "2",
+    "dfs.namenode.delegation.token.renew-interval" : "86400000",
+    "yarn.nodemanager.resource.memory-mb" : "8192",
+    "io.map.index.interval" : "128",
+    "s3.client-write-packet-size" : "65536",
+    "mapreduce.task.files.preserve.failedtasks" : "false",
+    "dfs.namenode.http-address" : "a2115.halxg.cloudera.com:20101",
+    "ha.zookeeper.session-timeout.ms" : "5000",
+    "hadoop.hdfs.configuration.version" : "1",
+    "s3.replication" : "3",
+    "dfs.datanode.balance.bandwidthPerSec" : "1048576",
+    "mapreduce.reduce.shuffle.connect.timeout" : "180000",
+    "hadoop.ssl.enabled" : "false",
+    "dfs.journalnode.rpc-address" : "0.0.0.0:8485",
+    "yarn.nodemanager.aux-services" : "mapreduce.shuffle",
+    "mapreduce.job.counters.max" : "120",
+    "dfs.datanode.readahead.bytes" : "4193404",
+    "ipc.client.connect.max.retries.on.timeouts" : "45",
+    "mapreduce.job.complete.cancel.delegation.tokens" : "true",
+    "dfs.client.failover.max.attempts" : "15",
+    "dfs.namenode.checkpoint.dir" : "file://${hadoop.tmp.dir}/dfs/namesecondary",
+    "dfs.namenode.replication.work.multiplier.per.iteration" : "2",
+    "fs.trash.interval" : "1",
+    "yarn.resourcemanager.admin.address" : "a2115.halxg.cloudera.com:8033",
+    "ha.health-monitor.check-interval.ms" : "1000",
+    "mapreduce.job.outputformat.class" : "org.apache.hadoop.examples.terasort.TeraOutputFormat",
+    "hadoop.jetty.logs.serve.aliases" : "true",
+    "hadoop.http.authentication.kerberos.principal" : "HTTP/_HOST@LOCALHOST",
+    "mapreduce.tasktracker.taskmemorymanager.monitoringinterval" : "5000",
+    "mapreduce.job.reduce.shuffle.consumer.plugin.class" : "org.apache.hadoop.mapreduce.task.reduce.Shuffle",
+    "s3native.blocksize" : "67108864",
+    "dfs.namenode.edits.dir" : "${dfs.namenode.name.dir}",
+    "ha.health-monitor.sleep-after-disconnect.ms" : "1000",
+    "dfs.encrypt.data.transfer" : "false",
+    "dfs.datanode.http.address" : "0.0.0.0:50075",
+    "mapreduce.terasort.num-rows" : "400000000",
+    "mapreduce.job.map.class" : "org.apache.hadoop.examples.terasort.TeraGen$SortGenMapper",
+    "mapreduce.jobtracker.jobhistory.task.numberprogresssplits" : "12",
+    "dfs.namenode.write.stale.datanode.ratio" : "0.5f",
+    "dfs.client.use.datanode.hostname" : "false",
+    "yarn.acl.enable" : "true",
+    "hadoop.security.instrumentation.requires.admin" : "false",
+    "yarn.nodemanager.localizer.fetch.thread-count" : "4",
+    "hadoop.security.authorization" : "false",
+    "user.name" : "jenkins",
+    "dfs.namenode.fs-limits.min-block-size" : "1048576",
+    "dfs.client.failover.connection.retries.on.timeouts" : "0",
+    "hadoop.security.group.mapping.ldap.search.filter.group" : "(objectClass=group)",
+    "mapreduce.output.fileoutputformat.compress.codec" : "org.apache.hadoop.io.compress.DefaultCodec",
+    "dfs.namenode.safemode.extension" : "30000",
+    "mapreduce.shuffle.port" : "8080",
+    "mapreduce.reduce.log.level" : "INFO",
+    "yarn.log-aggregation-enable" : "false",
+    "dfs.datanode.sync.behind.writes" : "false",
+    "mapreduce.jobtracker.instrumentation" : "org.apache.hadoop.mapred.JobTrackerMetricsInst",
+    "dfs.https.server.keystore.resource" : "ssl-server.xml",
+    "hadoop.security.group.mapping.ldap.search.attr.group.name" : "cn",
+    "dfs.namenode.replication.min" : "1",
+    "mapreduce.map.java.opts" : " -Xmx825955249",
+    "yarn.scheduler.fair.allocation.file" : "/etc/yarn/fair-scheduler.xml",
+    "s3native.bytes-per-checksum" : "512",
+    "mapreduce.tasktracker.tasks.sleeptimebeforesigkill" : "5000",
+    "tfile.fs.output.buffer.size" : "262144",
+    "yarn.nodemanager.local-dirs" : "${hadoop.tmp.dir}/nm-local-dir",
+    "mapreduce.jobtracker.persist.jobstatus.active" : "false",
+    "fs.AbstractFileSystem.hdfs.impl" : "org.apache.hadoop.fs.Hdfs",
+    "mapreduce.job.map.output.collector.class" : "org.apache.hadoop.mapred.MapTask$MapOutputBuffer",
+    "mapreduce.tasktracker.local.dir.minspacestart" : "0",
+    "dfs.namenode.safemode.min.datanodes" : "0",
+    "hadoop.security.uid.cache.secs" : "14400",
+    "dfs.client.https.need-auth" : "false",
+    "dfs.client.write.exclude.nodes.cache.expiry.interval.millis" : "600000",
+    "dfs.client.https.keystore.resource" : "ssl-client.xml",
+    "dfs.namenode.max.objects" : "0",
+    "hadoop.ssl.client.conf" : "ssl-client.xml",
+    "dfs.namenode.safemode.threshold-pct" : "0.999f",
+    "mapreduce.tasktracker.local.dir.minspacekill" : "0",
+    "mapreduce.jobtracker.retiredjobs.cache.size" : "1000",
+    "dfs.blocksize" : "134217728",
+    "yarn.resourcemanager.scheduler.class" : "org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler",
+    "mapreduce.job.reduce.slowstart.completedmaps" : "0.8",
+    "mapreduce.job.end-notification.retry.attempts" : "5",
+    "mapreduce.job.inputformat.class" : "org.apache.hadoop.examples.terasort.TeraGen$RangeInputFormat",
+    "mapreduce.map.memory.mb" : "1024",
+    "mapreduce.job.user.name" : "jenkins",
+    "mapreduce.tasktracker.outofband.heartbeat" : "false",
+    "io.native.lib.available" : "true",
+    "mapreduce.jobtracker.persist.jobstatus.hours" : "0",
+    "dfs.client-write-packet-size" : "65536",
+    "mapreduce.client.progressmonitor.pollinterval" : "1000",
+    "dfs.namenode.name.dir" : "file://${hadoop.tmp.dir}/dfs/name",
+    "dfs.ha.log-roll.period" : "120",
+    "mapreduce.reduce.input.buffer.percent" : "0.0",
+    "mapreduce.map.output.compress.codec" : "org.apache.hadoop.io.compress.SnappyCodec",
+    "mapreduce.map.skip.proc.count.autoincr" : "true",
+    "dfs.client.failover.sleep.base.millis" : "500",
+    "dfs.datanode.directoryscan.threads" : "1",
+    "mapreduce.jobtracker.address" : "neededForHive:999999",
+    "mapreduce.cluster.local.dir" : "${hadoop.tmp.dir}/mapred/local",
+    "yarn.scheduler.fair.user-as-default-queue" : "true",
+    "mapreduce.job.application.attempt.id" : "1",
+    "dfs.permissions.enabled" : "true",
+    "mapreduce.tasktracker.taskcontroller" : "org.apache.hadoop.mapred.DefaultTaskController",
+    "yarn.scheduler.fair.preemption" : "true",
+    "mapreduce.reduce.shuffle.parallelcopies" : "5",
+    "dfs.support.append" : "true",
+    "yarn.nodemanager.env-whitelist" : "JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,YARN_HOME",
+    "mapreduce.jobtracker.heartbeats.in.second" : "100",
+    "mapreduce.job.maxtaskfailures.per.tracker" : "3",
+    "ipc.client.connection.maxidletime" : "10000",
+    "mapreduce.shuffle.ssl.enabled" : "false",
+    "dfs.namenode.invalidate.work.pct.per.iteration" : "0.32f",
+    "dfs.blockreport.intervalMsec" : "21600000",
+    "fs.s3.sleepTimeSeconds" : "10",
+    "dfs.namenode.replication.considerLoad" : "true",
+    "dfs.client.block.write.retries" : "3",
+    "hadoop.ssl.server.conf" : "ssl-server.xml",
+    "dfs.namenode.name.dir.restore" : "false",
+    "rpc.engine.org.apache.hadoop.mapreduce.v2.api.MRClientProtocolPB" : "org.apache.hadoop.ipc.ProtobufRpcEngine",
+    "dfs.datanode.hdfs-blocks-metadata.enabled" : "true",
+    "ha.zookeeper.parent-znode" : "/hadoop-ha",
+    "io.seqfile.lazydecompress" : "true",
+    "dfs.https.enable" : "false",
+    "mapreduce.reduce.merge.inmem.threshold" : "1000",
+    "mapreduce.input.fileinputformat.split.minsize" : "0",
+    "dfs.replication" : "3",
+    "ipc.client.tcpnodelay" : "false",
+    "dfs.namenode.accesstime.precision" : "3600000",
+    "s3.stream-buffer-size" : "4096",
+    "mapreduce.jobtracker.tasktracker.maxblacklists" : "4",
+    "dfs.client.read.shortcircuit.skip.checksum" : "false",
+    "mapreduce.job.jvm.numtasks" : "1",
+    "mapreduce.task.io.sort.mb" : "100",
+    "io.file.buffer.size" : "65536",
+    "dfs.namenode.audit.loggers" : "default",
+    "dfs.namenode.checkpoint.txns" : "1000000",
+    "yarn.nodemanager.admin-env" : "MALLOC_ARENA_MAX=$MALLOC_ARENA_MAX",
+    "mapreduce.job.jar" : "/user/jenkins/.staging/job_1369942127770_1205/job.jar",
+    "mapreduce.job.split.metainfo.maxsize" : "10000000",
+    "kfs.replication" : "3",
+    "rpc.engine.org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB" : "org.apache.hadoop.ipc.ProtobufRpcEngine",
+    "yarn.app.mapreduce.am.scheduler.heartbeat.interval-ms" : "1000",
+    "mapreduce.reduce.maxattempts" : "4",
+    "kfs.stream-buffer-size" : "4096",
+    "dfs.ha.tail-edits.period" : "60",
+    "hadoop.security.authentication" : "simple",
+    "fs.s3.buffer.dir" : "${hadoop.tmp.dir}/s3",
+    "rpc.engine.org.apache.hadoop.yarn.api.AMRMProtocolPB" : "org.apache.hadoop.ipc.ProtobufRpcEngine",
+    "mapreduce.jobtracker.taskscheduler" : "org.apache.hadoop.mapred.JobQueueTaskScheduler",
+    "yarn.app.mapreduce.am.job.task.listener.thread-count" : "30",
+    "dfs.namenode.avoid.read.stale.datanode" : "false",
+    "mapreduce.job.reduces" : "0",
+    "mapreduce.map.sort.spill.percent" : "0.8",
+    "dfs.client.file-block-storage-locations.timeout" : "60",
+    "dfs.datanode.drop.cache.behind.writes" : "false",
+    "mapreduce.job.end-notification.retry.interval" : "1",
+    "mapreduce.job.maps" : "96",
+    "mapreduce.job.speculative.slownodethreshold" : "1.0",
+    "tfile.fs.input.buffer.size" : "262144",
+    "mapreduce.map.speculative" : "false",
+    "dfs.block.access.token.enable" : "false",
+    "dfs.journalnode.http-address" : "0.0.0.0:8480",
+    "mapreduce.job.acl-view-job" : " ",
+    "mapreduce.reduce.shuffle.retry-delay.max.ms" : "60000",
+    "yarn.ipc.serializer.type" : "protocolbuffers",
+    "mapreduce.job.end-notification.max.retry.interval" : "5",
+    "ftp.blocksize" : "67108864",
+    "mapreduce.tasktracker.http.threads" : "80",
+    "mapreduce.reduce.java.opts" : " -Xmx825955249",
+    "dfs.datanode.data.dir" : "file://${hadoop.tmp.dir}/dfs/data",
+    "ha.failover-controller.cli-check.rpc-timeout.ms" : "20000",
+    "dfs.namenode.max.extra.edits.segments.retained" : "10000",
+    "dfs.https.port" : "20102",
+    "dfs.namenode.replication.interval" : "3",
+    "mapreduce.task.skip.start.attempts" : "2",
+    "dfs.namenode.https-address" : "a2115.halxg.cloudera.com:20102",
+    "mapreduce.jobtracker.persist.jobstatus.dir" : "/jobtracker/jobsInfo",
+    "ipc.client.kill.max" : "10",
+    "dfs.ha.automatic-failover.enabled" : "false",
+    "mapreduce.jobhistory.keytab" : "/etc/security/keytab/jhs.service.keytab",
+    "dfs.image.transfer.timeout" : "600000",
+    "dfs.client.failover.sleep.max.millis" : "15000",
+    "mapreduce.job.end-notification.max.attempts" : "5",
+    "mapreduce.task.tmp.dir" : "./tmp",
+    "dfs.default.chunk.view.size" : "32768",
+    "kfs.bytes-per-checksum" : "512",
+    "mapreduce.reduce.memory.mb" : "1024",
+    "hadoop.http.filter.initializers" : "org.apache.hadoop.yarn.server.webproxy.amfilter.AmFilterInitializer",
+    "dfs.datanode.failed.volumes.tolerated" : "0",
+    "hadoop.http.authentication.type" : "simple",
+    "dfs.datanode.data.dir.perm" : "700",
+    "yarn.resourcemanager.client.thread-count" : "50",
+    "ipc.server.listen.queue.size" : "128",
+    "mapreduce.reduce.skip.maxgroups" : "0",
+    "file.stream-buffer-size" : "4096",
+    "dfs.namenode.fs-limits.max-directory-items" : "0",
+    "io.mapfile.bloom.size" : "1048576",
+    "yarn.nodemanager.container-executor.class" : "org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor",
+    "mapreduce.map.maxattempts" : "4",
+    "mapreduce.jobtracker.jobhistory.block.size" : "3145728",
+    "yarn.log-aggregation.retain-seconds" : "-1",
+    "yarn.app.mapreduce.am.job.committer.cancel-timeout" : "60000",
+    "ftp.replication" : "3",
+    "mapreduce.jobtracker.http.address" : "0.0.0.0:50030",
+    "yarn.nodemanager.health-checker.script.timeout-ms" : "1200000",
+    "mapreduce.jobhistory.address" : "a2115.halxg.cloudera.com:10020",
+    "mapreduce.jobtracker.taskcache.levels" : "2",
+    "dfs.datanode.dns.nameserver" : "default",
+    "mapreduce.application.classpath" : "$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*,$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*",
+    "yarn.nodemanager.log.retain-seconds" : "10800",
+    "mapred.child.java.opts" : "-Xmx200m",
+    "dfs.replication.max" : "512",
+    "map.sort.class" : "org.apache.hadoop.util.QuickSort",
+    "dfs.stream-buffer-size" : "4096",
+    "dfs.namenode.backup.address" : "0.0.0.0:50100",
+    "hadoop.util.hash.type" : "murmur",
+    "dfs.block.access.key.update.interval" : "600",
+    "mapreduce.reduce.skip.proc.count.autoincr" : "true",
+    "dfs.datanode.dns.interface" : "default",
+    "dfs.datanode.use.datanode.hostname" : "false",
+    "mapreduce.job.output.key.class" : "org.apache.hadoop.io.Text",
+    "dfs.client.read.shortcircuit" : "false",
+    "dfs.namenode.backup.http-address" : "0.0.0.0:50105",
+    "yarn.nodemanager.container-monitor.interval-ms" : "3000",
+    "yarn.nodemanager.disk-health-checker.min-healthy-disks" : "0.25",
+    "kfs.client-write-packet-size" : "65536",
+    "ha.zookeeper.acl" : "world:anyone:rwcda",
+    "yarn.nodemanager.sleep-delay-before-sigkill.ms" : "250",
+    "mapreduce.job.dir" : "/user/jenkins/.staging/job_1369942127770_1205",
+    "io.map.index.skip" : "0",
+    "net.topology.node.switch.mapping.impl" : "org.apache.hadoop.net.ScriptBasedMapping",
+    "fs.s3.maxRetries" : "4",
+    "dfs.namenode.logging.level" : "info",
+    "ha.failover-controller.new-active.rpc-timeout.ms" : "60000",
+    "s3native.client-write-packet-size" : "65536",
+    "yarn.resourcemanager.amliveliness-monitor.interval-ms" : "1000",
+    "hadoop.http.staticuser.user" : "dr.who",
+    "mapreduce.reduce.speculative" : "false",
+    "mapreduce.client.output.filter" : "FAILED",
+    "mapreduce.ifile.readahead.bytes" : "4194304",
+    "mapreduce.tasktracker.report.address" : "127.0.0.1:0",
+    "mapreduce.task.userlog.limit.kb" : "0",
+    "mapreduce.tasktracker.map.tasks.maximum" : "2",
+    "hadoop.http.authentication.simple.anonymous.allowed" : "true",
+    "hadoop.fuse.timer.period" : "5",
+    "dfs.namenode.num.extra.edits.retained" : "1000000",
+    "hadoop.rpc.socket.factory.class.default" : "org.apache.hadoop.net.StandardSocketFactory",
+    "mapreduce.job.submithostname" : "a2115.halxg.cloudera.com",
+    "dfs.namenode.handler.count" : "10",
+    "fs.automatic.close" : "false",
+    "mapreduce.job.submithostaddress" : "10.20.206.115",
+    "mapreduce.tasktracker.healthchecker.script.timeout" : "600000",
+    "dfs.datanode.directoryscan.interval" : "21600",
+    "yarn.resourcemanager.address" : "a2115.halxg.cloudera.com:8032",
+    "yarn.nodemanager.health-checker.interval-ms" : "600000",
+    "dfs.client.file-block-storage-locations.num-threads" : "10",
+    "yarn.resourcemanager.container-tokens.master-key-rolling-interval-secs" : "86400",
+    "mapreduce.reduce.markreset.buffer.percent" : "0.0",
+    "hadoop.security.group.mapping.ldap.directory.search.timeout" : "10000",
+    "mapreduce.map.log.level" : "INFO",
+    "dfs.bytes-per-checksum" : "512",
+    "yarn.nodemanager.localizer.address" : "0.0.0.0:8040",
+    "dfs.namenode.checkpoint.max-retries" : "3",
+    "ha.health-monitor.rpc-timeout.ms" : "45000",
+    "yarn.resourcemanager.keytab" : "/etc/krb5.keytab",
+    "ftp.stream-buffer-size" : "4096",
+    "dfs.namenode.avoid.write.stale.datanode" : "false",
+    "hadoop.security.group.mapping.ldap.search.attr.member" : "member",
+    "mapreduce.output.fileoutputformat.outputdir" : "hdfs://a2115.halxg.cloudera.com:8020/user/jenkins/tera-gen-1",
+    "dfs.blockreport.initialDelay" : "0",
+    "yarn.nm.liveness-monitor.expiry-interval-ms" : "600000",
+    "hadoop.http.authentication.token.validity" : "36000",
+    "dfs.namenode.delegation.token.max-lifetime" : "604800000",
+    "mapreduce.job.hdfs-servers" : "${fs.defaultFS}",
+    "s3native.replication" : "3",
+    "yarn.nodemanager.localizer.client.thread-count" : "5",
+    "dfs.heartbeat.interval" : "3",
+    "rpc.engine.org.apache.hadoop.ipc.ProtocolMetaInfoPB" : "org.apache.hadoop.ipc.ProtobufRpcEngine",
+    "dfs.ha.fencing.ssh.connect-timeout" : "30000",
+    "yarn.resourcemanager.container.liveness-monitor.interval-ms" : "600000",
+    "yarn.am.liveness-monitor.expiry-interval-ms" : "600000",
+    "mapreduce.task.profile" : "false",
+    "mapreduce.tasktracker.http.address" : "0.0.0.0:50060",
+    "mapreduce.tasktracker.instrumentation" : "org.apache.hadoop.mapred.TaskTrackerMetricsInst",
+    "mapreduce.jobhistory.webapp.address" : "a2115.halxg.cloudera.com:19888",
+    "ha.failover-controller.graceful-fence.rpc-timeout.ms" : "5000",
+    "yarn.ipc.rpc.class" : "org.apache.hadoop.yarn.ipc.HadoopYarnProtoRPC",
+    "mapreduce.job.name" : "TeraGen",
+    "kfs.blocksize" : "67108864",
+    "yarn.resourcemanager.application-tokens.master-key-rolling-interval-secs" : "86400",
+    "mapreduce.job.ubertask.maxmaps" : "9",
+    "yarn.scheduler.maximum-allocation-mb" : "8192",
+    "yarn.nodemanager.heartbeat.interval-ms" : "1000",
+    "mapreduce.job.userlog.retain.hours" : "24",
+    "dfs.namenode.secondary.http-address" : "0.0.0.0:50090",
+    "mapreduce.task.timeout" : "600000",
+    "mapreduce.framework.name" : "yarn",
+    "ipc.client.idlethreshold" : "4000",
+    "ftp.bytes-per-checksum" : "512",
+    "ipc.server.tcpnodelay" : "false",
+    "dfs.namenode.stale.datanode.interval" : "30000",
+    "s3.bytes-per-checksum" : "512",
+    "mapreduce.job.speculative.slowtaskthreshold" : "1.0",
+    "yarn.nodemanager.localizer.cache.target-size-mb" : "10240",
+    "yarn.nodemanager.remote-app-log-dir" : "/tmp/logs",
+    "fs.s3.block.size" : "67108864",
+    "mapreduce.job.queuename" : "sls_queue_1",
+    "dfs.client.failover.connection.retries" : "0",
+    "hadoop.rpc.protection" : "authentication",
+    "yarn.scheduler.minimum-allocation-mb" : "1024",
+    "yarn.app.mapreduce.client-am.ipc.max-retries" : "1",
+    "hadoop.security.auth_to_local" : "DEFAULT",
+    "dfs.secondary.namenode.kerberos.internal.spnego.principal" : "${dfs.web.authentication.kerberos.principal}",
+    "ftp.client-write-packet-size" : "65536",
+    "fs.defaultFS" : "hdfs://a2115.halxg.cloudera.com:8020",
+    "yarn.nodemanager.address" : "0.0.0.0:0",
+    "yarn.scheduler.fair.assignmultiple" : "true",
+    "yarn.resourcemanager.scheduler.client.thread-count" : "50",
+    "mapreduce.task.merge.progress.records" : "10000",
+    "file.client-write-packet-size" : "65536",
+    "yarn.nodemanager.delete.thread-count" : "4",
+    "yarn.resourcemanager.scheduler.address" : "a2115.halxg.cloudera.com:8030",
+    "fs.trash.checkpoint.interval" : "0",
+    "hadoop.http.authentication.signature.secret.file" : "${user.home}/hadoop-http-auth-signature-secret",
+    "s3native.stream-buffer-size" : "4096",
+    "mapreduce.reduce.shuffle.read.timeout" : "180000",
+    "mapreduce.admin.user.env" : "LD_LIBRARY_PATH=$HADOOP_COMMON_HOME/lib/native",
+    "yarn.app.mapreduce.am.command-opts" : " -Xmx1238932873",
+    "mapreduce.local.clientfactory.class.name" : "org.apache.hadoop.mapred.LocalClientFactory",
+    "dfs.namenode.checkpoint.edits.dir" : "${dfs.namenode.checkpoint.dir}",
+    "fs.permissions.umask-mode" : "022",
+    "dfs.client.domain.socket.data.traffic" : "false",
+    "hadoop.common.configuration.version" : "0.23.0",
+    "mapreduce.tasktracker.dns.interface" : "default",
+    "mapreduce.output.fileoutputformat.compress.type" : "BLOCK",
+    "mapreduce.ifile.readahead" : "true",
+    "hadoop.security.group.mapping.ldap.ssl" : "false",
+    "io.serializations" : "org.apache.hadoop.io.serializer.WritableSerialization,org.apache.hadoop.io.serializer.avro.AvroSpecificSerialization,org.apache.hadoop.io.serializer.avro.AvroReflectSerialization",
+    "yarn.nodemanager.aux-services.mapreduce.shuffle.class" : "org.apache.hadoop.mapred.ShuffleHandler",
+    "fs.df.interval" : "60000",
+    "mapreduce.reduce.shuffle.input.buffer.percent" : "0.70",
+    "io.seqfile.compress.blocksize" : "1000000",
+    "hadoop.security.groups.cache.secs" : "300",
+    "ipc.client.connect.max.retries" : "10",
+    "dfs.namenode.delegation.key.update-interval" : "86400000",
+    "yarn.nodemanager.process-kill-wait.ms" : "2000",
+    "yarn.application.classpath" : "$HADOOP_CONF_DIR,$HADOOP_COMMON_HOME/*,$HADOOP_COMMON_HOME/lib/*,$HADOOP_HDFS_HOME/*,$HADOOP_HDFS_HOME/lib/*,$HADOOP_MAPRED_HOME/*,$HADOOP_MAPRED_HOME/lib/*,$YARN_HOME/*,$YARN_HOME/lib/*",
+    "yarn.app.mapreduce.client.max-retries" : "3",
+    "dfs.datanode.available-space-volume-choosing-policy.balanced-space-preference-fraction" : "0.75f",
+    "yarn.nodemanager.log-aggregation.compression-type" : "none",
+    "hadoop.security.group.mapping.ldap.search.filter.user" : "(&(objectClass=user)(sAMAccountName={0}))",
+    "yarn.nodemanager.localizer.cache.cleanup.interval-ms" : "600000",
+    "dfs.image.compress" : "false",
+    "mapred.mapper.new-api" : "true",
+    "yarn.nodemanager.log-dirs" : "${yarn.log.dir}/userlogs",
+    "dfs.namenode.kerberos.internal.spnego.principal" : "${dfs.web.authentication.kerberos.principal}",
+    "fs.s3n.block.size" : "67108864",
+    "fs.ftp.host" : "0.0.0.0",
+    "hadoop.security.group.mapping" : "org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback",
+    "dfs.datanode.address" : "0.0.0.0:50010",
+    "mapreduce.map.skip.maxrecords" : "0",
+    "dfs.datanode.https.address" : "0.0.0.0:50475",
+    "file.replication" : "1",
+    "yarn.resourcemanager.resource-tracker.address" : "a2115.halxg.cloudera.com:8031",
+    "dfs.datanode.drop.cache.behind.reads" : "false",
+    "hadoop.fuse.connection.timeout" : "300",
+    "hadoop.work.around.non.threadsafe.getpwuid" : "false",
+    "mapreduce.jobtracker.restart.recover" : "false",
+    "hadoop.tmp.dir" : "/tmp/hadoop-${user.name}",
+    "mapreduce.output.fileoutputformat.compress" : "false",
+    "mapreduce.tasktracker.indexcache.mb" : "10",
+    "mapreduce.client.genericoptionsparser.used" : "true",
+    "dfs.client.block.write.replace-datanode-on-failure.policy" : "DEFAULT",
+    "mapreduce.job.committer.setup.cleanup.needed" : "true",
+    "hadoop.kerberos.kinit.command" : "kinit",
+    "dfs.datanode.du.reserved" : "0",
+    "dfs.namenode.fs-limits.max-blocks-per-file" : "1048576",
+    "dfs.webhdfs.enabled" : "false",
+    "file.bytes-per-checksum" : "512",
+    "mapreduce.task.profile.reduces" : "0-2",
+    "mapreduce.jobtracker.handler.count" : "10",
+    "dfs.client.block.write.replace-datanode-on-failure.enable" : "true",
+    "mapreduce.job.output.value.class" : "org.apache.hadoop.io.Text",
+    "yarn.dispatcher.exit-on-error" : "true",
+    "net.topology.script.number.args" : "100",
+    "mapreduce.task.profile.maps" : "0-2",
+    "dfs.namenode.decommission.interval" : "30",
+    "dfs.image.compression.codec" : "org.apache.hadoop.io.compress.DefaultCodec",
+    "yarn.resourcemanager.webapp.address" : "a2115.halxg.cloudera.com:8088",
+    "mapreduce.jobtracker.system.dir" : "${hadoop.tmp.dir}/mapred/system",
+    "hadoop.ssl.hostname.verifier" : "DEFAULT",
+    "yarn.nodemanager.vmem-pmem-ratio" : "2.1",
+    "dfs.namenode.support.allow.format" : "true",
+    "mapreduce.jobhistory.principal" : "jhs/_HOST@REALM.TLD",
+    "io.mapfile.bloom.error.rate" : "0.005",
+    "mapreduce.shuffle.ssl.file.buffer.size" : "65536",
+    "dfs.permissions.superusergroup" : "supergroup",
+    "dfs.datanode.available-space-volume-choosing-policy.balanced-space-threshold" : "10737418240",
+    "mapreduce.jobtracker.expire.trackers.interval" : "600000",
+    "mapreduce.cluster.acls.enabled" : "false",
+    "yarn.nodemanager.remote-app-log-dir-suffix" : "logs",
+    "ha.failover-controller.graceful-fence.connection.retries" : "1",
+    "ha.health-monitor.connect-retry-interval.ms" : "1000",
+    "mapreduce.reduce.shuffle.merge.percent" : "0.66",
+    "yarn.app.mapreduce.am.resource.mb" : "1536",
+    "io.seqfile.local.dir" : "${hadoop.tmp.dir}/io/local",
+    "dfs.namenode.checkpoint.check.period" : "60",
+    "yarn.resourcemanager.nm.liveness-monitor.interval-ms" : "1000",
+    "mapreduce.jobtracker.maxtasks.perjob" : "-1",
+    "mapreduce.jobtracker.jobhistory.lru.cache.size" : "5",
+    "file.blocksize" : "67108864",
+    "tfile.io.chunk.size" : "1048576",
+    "mapreduce.job.acl-modify-job" : " ",
+    "yarn.nodemanager.webapp.address" : "0.0.0.0:8042",
+    "mapreduce.tasktracker.reduce.tasks.maximum" : "2",
+    "io.skip.checksum.errors" : "false",
+    "mapreduce.cluster.temp.dir" : "${hadoop.tmp.dir}/mapred/temp",
+    "yarn.app.mapreduce.am.staging-dir" : "/user",
+    "dfs.namenode.edits.journal-plugin.qjournal" : "org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager",
+    "dfs.datanode.handler.count" : "10",
+    "fs.ftp.host.port" : "21",
+    "dfs.namenode.decommission.nodes.per.interval" : "5",
+    "yarn.resourcemanager.admin.client.thread-count" : "1",
+    "dfs.namenode.fs-limits.max-component-length" : "0",
+    "dfs.namenode.checkpoint.period" : "3600",
+    "fs.AbstractFileSystem.viewfs.impl" : "org.apache.hadoop.fs.viewfs.ViewFs",
+    "yarn.resourcemanager.resource-tracker.client.thread-count" : "50",
+    "mapreduce.tasktracker.dns.nameserver" : "default",
+    "mapreduce.map.output.compress" : "true",
+    "dfs.datanode.ipc.address" : "0.0.0.0:50020",
+    "hadoop.ssl.require.client.cert" : "false",
+    "yarn.nodemanager.delete.debug-delay-sec" : "0",
+    "dfs.datanode.max.transfer.threads" : "4096"
+  },
+  "computonsPerMapInputByte" : -1,
+  "computonsPerMapOutputByte" : -1,
+  "computonsPerReduceInputByte" : -1,
+  "computonsPerReduceOutputByte" : -1,
+  "heapMegabytes" : 200,
+  "outcome" : "SUCCESS",
+  "jobtype" : "JAVA",
+  "directDependantJobs" : [ ],
+  "successfulMapAttemptCDFs" : [ {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 47021,
+    "minimum" : 11143,
+    "rankings" : [ {
+      "datum" : 13354,
+      "relativeRanking" : 0.05
+    }, {
+      "datum" : 14101,
+      "relativeRanking" : 0.1
+    }, {
+      "datum" : 15609,
+      "relativeRanking" : 0.15
+    }, {
+      "datum" : 15919,
+      "relativeRanking" : 0.2
+    }, {
+      "datum" : 17003,
+      "relativeRanking" : 0.25
+    }, {
+      "datum" : 17109,
+      "relativeRanking" : 0.3
+    }, {
+      "datum" : 18342,
+      "relativeRanking" : 0.35
+    }, {
+      "datum" : 18870,
+      "relativeRanking" : 0.4
+    }, {
+      "datum" : 19127,
+      "relativeRanking" : 0.45
+    }, {
+      "datum" : 19221,
+      "relativeRanking" : 0.5
+    }, {
+      "datum" : 19481,
+      "relativeRanking" : 0.55
+    }, {
+      "datum" : 19896,
+      "relativeRanking" : 0.6
+    }, {
+      "datum" : 20585,
+      "relativeRanking" : 0.65
+    }, {
+      "datum" : 20784,
+      "relativeRanking" : 0.7
+    }, {
+      "datum" : 21452,
+      "relativeRanking" : 0.75
+    }, {
+      "datum" : 21853,
+      "relativeRanking" : 0.8
+    }, {
+      "datum" : 22436,
+      "relativeRanking" : 0.85
+    }, {
+      "datum" : 32646,
+      "relativeRanking" : 0.9
+    }, {
+      "datum" : 41553,
+      "relativeRanking" : 0.95
+    } ],
+    "numberValues" : 96
+  } ],
+  "failedMapAttemptCDFs" : [ {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  } ],
+  "successfulReduceAttemptCDF" : {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  },
+  "failedReduceAttemptCDF" : {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  },
+  "mapperTriesToSucceed" : [ 1.0 ],
+  "failedMapperFraction" : 0.0,
+  "relativeTime" : 0,
+  "clusterMapMB" : -1,
+  "clusterReduceMB" : -1,
+  "jobMapMB" : 200,
+  "jobReduceMB" : 200
+} {
+  "priority" : "NORMAL",
+  "jobID" : "job_1369942127770_1206",
+  "user" : "jenkins",
+  "jobName" : "TeraGen",
+  "submitTime" : 1371222159703,
+  "finishTime" : 1371222251755,
+  "queue" : "sls_queue_1",
+  "mapTasks" : [ {
+    "startTime" : 1371222164113,
+    "taskID" : "task_1369942127770_1206_m_000000",
+    "taskType" : "MAP",
+    "finishTime" : 1371222188484,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222166321,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222188484,
+      "attemptID" : "attempt_1369942127770_1206_m_000000_0",
+      "clockSplits" : [ 2278, 2279, 2279, 2279, 1641, 1090, 1090, 3620, 943, 943, 943, 2773 ],
+      "cpuUsages" : [ 1480, 1481, 1481, 1481, 1298, 1141, 1141, 1312, 814, 815, 814, 1062 ],
+      "vmemKbytes" : [ 161561, 484683, 807806, 1130929, 1407572, 1442299, 1442300, 1442299, 1442300, 1442300, 1442299, 1442300 ],
+      "physMemKbytes" : [ 34370, 103111, 171853, 240594, 299471, 307004, 307167, 309072, 310772, 308485, 306197, 304712 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 82,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14320,
+        "virtualMemoryUsage" : 1476915200,
+        "physicalMemoryUsage" : 311963648,
+        "heapUsage" : 735051776
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 82,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164115,
+    "taskID" : "task_1369942127770_1206_m_000001",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185876,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222166287,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185876,
+      "attemptID" : "attempt_1369942127770_1206_m_000001_0",
+      "clockSplits" : [ 1967, 1967, 1967, 1967, 1968, 1160, 1022, 1021, 922, 887, 887, 3761 ],
+      "cpuUsages" : [ 1290, 1290, 1290, 1291, 1290, 1137, 1110, 1111, 890, 812, 812, 1247 ],
+      "vmemKbytes" : [ 136908, 410726, 684543, 958360, 1232179, 1406210, 1409140, 1409139, 1409140, 1409140, 1409139, 1409140 ],
+      "physMemKbytes" : [ 29838, 89517, 149196, 208875, 268554, 307143, 309569, 311375, 312131, 310214, 308165, 306185 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 85,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13650,
+        "virtualMemoryUsage" : 1442959360,
+        "physicalMemoryUsage" : 312889344,
+        "heapUsage" : 734986240
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 85,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164115,
+    "taskID" : "task_1369942127770_1206_m_000002",
+    "taskType" : "MAP",
+    "finishTime" : 1371222187434,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222166324,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222187434,
+      "attemptID" : "attempt_1369942127770_1206_m_000002_0",
+      "clockSplits" : [ 2525, 2525, 2525, 2526, 1158, 1048, 1049, 3067, 3187, 40, 40, 40 ],
+      "cpuUsages" : [ 1475, 1475, 1475, 1475, 1136, 1109, 1109, 1564, 795, 739, 739, 739 ],
+      "vmemKbytes" : [ 174639, 523917, 873196, 1222474, 1422137, 1423103, 1423104, 1423103, 1423104, 1423104, 1423103, 1423104 ],
+      "physMemKbytes" : [ 38111, 114334, 190557, 266780, 310216, 310109, 309790, 309622, 308756, 306687, 304614, 302541 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 85,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14130,
+        "virtualMemoryUsage" : 1457258496,
+        "physicalMemoryUsage" : 308678656,
+        "heapUsage" : 740360192
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 85,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164115,
+    "taskID" : "task_1369942127770_1206_m_000003",
+    "taskType" : "MAP",
+    "finishTime" : 1371222186091,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222166325,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222186091,
+      "attemptID" : "attempt_1369942127770_1206_m_000003_0",
+      "clockSplits" : [ 2228, 2229, 2229, 2228, 1992, 1092, 1093, 1296, 4777, 199, 199, 199 ],
+      "cpuUsages" : [ 1387, 1388, 1388, 1388, 1346, 1185, 1184, 1169, 1046, 879, 880, 880 ],
+      "vmemKbytes" : [ 148980, 446940, 744901, 1042862, 1334323, 1427567, 1427568, 1427567, 1427568, 1427568, 1427567, 1427568 ],
+      "physMemKbytes" : [ 31982, 95948, 159914, 223879, 286454, 306599, 306786, 306971, 307048, 307043, 307026, 307009 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 85,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14120,
+        "virtualMemoryUsage" : 1461829632,
+        "physicalMemoryUsage" : 314368000,
+        "heapUsage" : 728760320
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 85,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164116,
+    "taskID" : "task_1369942127770_1206_m_000004",
+    "taskType" : "MAP",
+    "finishTime" : 1371222189053,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222166287,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222189053,
+      "attemptID" : "attempt_1369942127770_1206_m_000004_0",
+      "clockSplits" : [ 2506, 2507, 2507, 2507, 1358, 1134, 1277, 3003, 1031, 1032, 3177, 718 ],
+      "cpuUsages" : [ 1424, 1424, 1425, 1424, 1199, 1156, 1162, 1212, 826, 825, 851, 1032 ],
+      "vmemKbytes" : [ 170607, 511823, 853038, 1194253, 1416017, 1420563, 1420564, 1420563, 1420564, 1420564, 1420563, 1420564 ],
+      "physMemKbytes" : [ 36772, 110318, 183863, 257408, 305224, 306250, 306299, 306447, 304928, 302270, 299633, 298578 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 85,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13960,
+        "virtualMemoryUsage" : 1454657536,
+        "physicalMemoryUsage" : 305713152,
+        "heapUsage" : 728367104
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 85,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164116,
+    "taskID" : "task_1369942127770_1206_m_000005",
+    "taskType" : "MAP",
+    "finishTime" : 1371222184979,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222166323,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222184979,
+      "attemptID" : "attempt_1369942127770_1206_m_000005_0",
+      "clockSplits" : [ 1921, 1921, 1921, 1921, 1922, 1602, 1010, 1010, 1013, 1026, 1026, 2353 ],
+      "cpuUsages" : [ 1306, 1306, 1306, 1306, 1306, 1250, 1146, 1146, 1053, 788, 788, 1199 ],
+      "vmemKbytes" : [ 126096, 378289, 630482, 882675, 1134868, 1371662, 1425028, 1425027, 1425028, 1425028, 1425027, 1425028 ],
+      "physMemKbytes" : [ 28145, 84436, 140727, 197018, 253310, 306166, 318110, 318149, 318111, 316467, 314188, 311974 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13900,
+        "virtualMemoryUsage" : 1459228672,
+        "physicalMemoryUsage" : 318754816,
+        "heapUsage" : 734986240
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164116,
+    "taskID" : "task_1369942127770_1206_m_000006",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185246,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222166324,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185246,
+      "attemptID" : "attempt_1369942127770_1206_m_000006_0",
+      "clockSplits" : [ 2131, 2131, 2132, 2131, 2083, 1125, 1125, 1164, 1326, 1326, 1702, 541 ],
+      "cpuUsages" : [ 1351, 1351, 1351, 1351, 1344, 1220, 1220, 1130, 761, 760, 931, 960 ],
+      "vmemKbytes" : [ 145579, 436739, 727899, 1019058, 1309880, 1441771, 1441772, 1441771, 1441772, 1441772, 1441771, 1441772 ],
+      "physMemKbytes" : [ 31512, 94536, 157560, 220583, 283538, 313578, 316306, 318981, 319869, 319878, 318776, 315776 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13730,
+        "virtualMemoryUsage" : 1476374528,
+        "physicalMemoryUsage" : 321802240,
+        "heapUsage" : 740491264
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164117,
+    "taskID" : "task_1369942127770_1206_m_000007",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185092,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222166325,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185092,
+      "attemptID" : "attempt_1369942127770_1206_m_000007_0",
+      "clockSplits" : [ 1853, 1853, 1853, 1854, 1853, 1487, 971, 970, 986, 1064, 1064, 2953 ],
+      "cpuUsages" : [ 1287, 1287, 1288, 1287, 1287, 1189, 1049, 1049, 1004, 776, 776, 1151 ],
+      "vmemKbytes" : [ 126150, 378452, 630754, 883055, 1135357, 1365947, 1409140, 1409139, 1409140, 1409140, 1409139, 1409140 ],
+      "physMemKbytes" : [ 27651, 82956, 138261, 193565, 248870, 299639, 311257, 313850, 316375, 315596, 313007, 310500 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13430,
+        "virtualMemoryUsage" : 1442959360,
+        "physicalMemoryUsage" : 317206528,
+        "heapUsage" : 740425728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164117,
+    "taskID" : "task_1369942127770_1206_m_000008",
+    "taskType" : "MAP",
+    "finishTime" : 1371222188434,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222166282,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222188434,
+      "attemptID" : "attempt_1369942127770_1206_m_000008_0",
+      "clockSplits" : [ 2257, 2258, 2258, 2257, 1845, 1172, 1171, 3581, 845, 845, 845, 2798 ],
+      "cpuUsages" : [ 1359, 1359, 1359, 1360, 1314, 1240, 1241, 1179, 860, 861, 861, 1097 ],
+      "vmemKbytes" : [ 153669, 461007, 768346, 1075685, 1360846, 1419935, 1419936, 1419935, 1419936, 1419936, 1419935, 1419936 ],
+      "physMemKbytes" : [ 34010, 102032, 170054, 238075, 301205, 314458, 314675, 315015, 314035, 311954, 309873, 308002 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14090,
+        "virtualMemoryUsage" : 1454014464,
+        "physicalMemoryUsage" : 315056128,
+        "heapUsage" : 735051776
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164117,
+    "taskID" : "task_1369942127770_1206_m_000009",
+    "taskType" : "MAP",
+    "finishTime" : 1371222186078,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222166289,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222186078,
+      "attemptID" : "attempt_1369942127770_1206_m_000009_0",
+      "clockSplits" : [ 2038, 2039, 2038, 2039, 2038, 1268, 1144, 1104, 802, 803, 803, 3666 ],
+      "cpuUsages" : [ 1317, 1317, 1318, 1317, 1317, 1417, 1432, 1349, 722, 722, 723, 1209 ],
+      "vmemKbytes" : [ 139866, 419600, 699334, 979067, 1258801, 1434828, 1437528, 1437527, 1437528, 1437528, 1437527, 1437528 ],
+      "physMemKbytes" : [ 30358, 91075, 151792, 212509, 273226, 312566, 316176, 319207, 320182, 319829, 319476, 319130 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72234,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14160,
+        "virtualMemoryUsage" : 1472028672,
+        "physicalMemoryUsage" : 326660096,
+        "heapUsage" : 740360192
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72234,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164118,
+    "taskID" : "task_1369942127770_1206_m_000010",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185273,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222166293,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185273,
+      "attemptID" : "attempt_1369942127770_1206_m_000010_0",
+      "clockSplits" : [ 1550, 1551, 1551, 1551, 1551, 1551, 1348, 982, 983, 1069, 1644, 3642 ],
+      "cpuUsages" : [ 1196, 1197, 1197, 1197, 1197, 1197, 1161, 1097, 1097, 1062, 830, 1372 ],
+      "vmemKbytes" : [ 106103, 318309, 530515, 742720, 954927, 1167133, 1365716, 1409403, 1409404, 1409404, 1409403, 1409404 ],
+      "physMemKbytes" : [ 23450, 70351, 117253, 164154, 211056, 257957, 301852, 311562, 311632, 311701, 311734, 311749 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13800,
+        "virtualMemoryUsage" : 1443229696,
+        "physicalMemoryUsage" : 319262720,
+        "heapUsage" : 728629248
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164118,
+    "taskID" : "task_1369942127770_1206_m_000011",
+    "taskType" : "MAP",
+    "finishTime" : 1371222188434,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222166290,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222188434,
+      "attemptID" : "attempt_1369942127770_1206_m_000011_0",
+      "clockSplits" : [ 2018, 2018, 2019, 2018, 2019, 1684, 1356, 6988, 74, 73, 74, 74 ],
+      "cpuUsages" : [ 1424, 1425, 1425, 1424, 1425, 1364, 1305, 1424, 818, 819, 818, 819 ],
+      "vmemKbytes" : [ 128226, 384681, 641136, 897591, 1154046, 1377893, 1409404, 1409403, 1409404, 1409404, 1409403, 1409404 ],
+      "physMemKbytes" : [ 28599, 85797, 142996, 200194, 257393, 307333, 314455, 314599, 314625, 314232, 313838, 313445 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14790,
+        "virtualMemoryUsage" : 1443229696,
+        "physicalMemoryUsage" : 320749568,
+        "heapUsage" : 740425728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164118,
+    "taskID" : "task_1369942127770_1206_m_000012",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185278,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222166295,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185278,
+      "attemptID" : "attempt_1369942127770_1206_m_000012_0",
+      "clockSplits" : [ 1913, 1914, 1914, 1914, 1914, 1611, 911, 910, 911, 1149, 1191, 2725 ],
+      "cpuUsages" : [ 1375, 1376, 1376, 1376, 1376, 1301, 1127, 1127, 1128, 891, 850, 1257 ],
+      "vmemKbytes" : [ 124608, 373827, 623045, 872262, 1121481, 1359363, 1420140, 1420139, 1420140, 1420140, 1420139, 1420140 ],
+      "physMemKbytes" : [ 26214, 78645, 131075, 183505, 235936, 285986, 298857, 298969, 299082, 298216, 295652, 293146 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14560,
+        "virtualMemoryUsage" : 1454223360,
+        "physicalMemoryUsage" : 299470848,
+        "heapUsage" : 740491264
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164119,
+    "taskID" : "task_1369942127770_1206_m_000013",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185273,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222166291,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185273,
+      "attemptID" : "attempt_1369942127770_1206_m_000013_0",
+      "clockSplits" : [ 1713, 1714, 1713, 1714, 1713, 1714, 1293, 1179, 1176, 1125, 1125, 2795 ],
+      "cpuUsages" : [ 1221, 1221, 1221, 1221, 1221, 1221, 1236, 1241, 1229, 807, 807, 1234 ],
+      "vmemKbytes" : [ 115735, 347206, 578677, 810148, 1041619, 1273090, 1433402, 1438795, 1438796, 1438796, 1438795, 1438796 ],
+      "physMemKbytes" : [ 25299, 75897, 126496, 177095, 227694, 278292, 314180, 318040, 320785, 321923, 321617, 321326 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13880,
+        "virtualMemoryUsage" : 1473327104,
+        "physicalMemoryUsage" : 328986624,
+        "heapUsage" : 740556800
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164120,
+    "taskID" : "task_1369942127770_1206_m_000014",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185953,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222166297,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185953,
+      "attemptID" : "attempt_1369942127770_1206_m_000014_0",
+      "clockSplits" : [ 1818, 1819, 1819, 1819, 1819, 1797, 1598, 1781, 4888, 164, 164, 164 ],
+      "cpuUsages" : [ 1243, 1244, 1244, 1244, 1244, 1251, 1319, 1273, 930, 856, 856, 856 ],
+      "vmemKbytes" : [ 121322, 363966, 606611, 849256, 1091901, 1333349, 1431760, 1431686, 1425453, 1421556, 1421555, 1421556 ],
+      "physMemKbytes" : [ 26145, 78435, 130726, 183016, 235307, 287356, 310547, 313799, 309838, 305300, 303271, 301242 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13560,
+        "virtualMemoryUsage" : 1455673344,
+        "physicalMemoryUsage" : 307433472,
+        "heapUsage" : 723845120
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164120,
+    "taskID" : "task_1369942127770_1206_m_000015",
+    "taskType" : "MAP",
+    "finishTime" : 1371222189058,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222166333,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222189058,
+      "attemptID" : "attempt_1369942127770_1206_m_000015_0",
+      "clockSplits" : [ 2170, 2171, 2171, 2171, 2028, 1094, 1095, 4145, 798, 798, 798, 3281 ],
+      "cpuUsages" : [ 1358, 1358, 1358, 1358, 1333, 1171, 1172, 1237, 815, 816, 815, 1259 ],
+      "vmemKbytes" : [ 146393, 439180, 731967, 1024754, 1314962, 1425067, 1425068, 1425067, 1425068, 1425068, 1425067, 1425068 ],
+      "physMemKbytes" : [ 32691, 98075, 163459, 228842, 293658, 318728, 319501, 320253, 319820, 318699, 317577, 316047 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14050,
+        "virtualMemoryUsage" : 1459269632,
+        "physicalMemoryUsage" : 320176128,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164121,
+    "taskID" : "task_1369942127770_1206_m_000016",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185112,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222166298,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185112,
+      "attemptID" : "attempt_1369942127770_1206_m_000016_0",
+      "clockSplits" : [ 2147, 2147, 2148, 2147, 2054, 874, 874, 874, 919, 985, 986, 2651 ],
+      "cpuUsages" : [ 1392, 1392, 1393, 1392, 1371, 1101, 1100, 1100, 1008, 870, 870, 1241 ],
+      "vmemKbytes" : [ 144202, 432606, 721011, 1009416, 1297041, 1420819, 1420820, 1420819, 1420820, 1420820, 1420819, 1420820 ],
+      "physMemKbytes" : [ 30336, 91008, 151680, 212351, 272862, 299357, 300156, 300954, 301511, 299852, 297656, 295530 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14230,
+        "virtualMemoryUsage" : 1454919680,
+        "physicalMemoryUsage" : 301989888,
+        "heapUsage" : 734920704
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164121,
+    "taskID" : "task_1369942127770_1206_m_000017",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185125,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222166299,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185125,
+      "attemptID" : "attempt_1369942127770_1206_m_000017_0",
+      "clockSplits" : [ 2056, 2056, 2056, 2057, 2056, 1240, 1157, 1132, 945, 946, 945, 2174 ],
+      "cpuUsages" : [ 1376, 1377, 1376, 1377, 1377, 1106, 1080, 1060, 914, 915, 915, 1267 ],
+      "vmemKbytes" : [ 141624, 424872, 708121, 991370, 1274619, 1441166, 1442372, 1442371, 1442372, 1442372, 1442371, 1442372 ],
+      "physMemKbytes" : [ 30671, 92015, 153358, 214701, 276045, 312210, 312702, 312916, 311552, 309174, 306795, 305251 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14140,
+        "virtualMemoryUsage" : 1476988928,
+        "physicalMemoryUsage" : 312541184,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164121,
+    "taskID" : "task_1369942127770_1206_m_000018",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185117,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222166301,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185117,
+      "attemptID" : "attempt_1369942127770_1206_m_000018_0",
+      "clockSplits" : [ 1934, 1934, 1934, 1934, 1934, 1203, 1012, 1012, 930, 897, 896, 3188 ],
+      "cpuUsages" : [ 1359, 1360, 1359, 1360, 1359, 1168, 1117, 1117, 949, 878, 878, 1216 ],
+      "vmemKbytes" : [ 138262, 414786, 691311, 967835, 1244360, 1434031, 1439980, 1439979, 1439980, 1439980, 1439979, 1439980 ],
+      "physMemKbytes" : [ 30204, 90615, 151026, 211436, 271847, 313905, 317141, 319119, 320017, 317820, 315430, 313109 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14120,
+        "virtualMemoryUsage" : 1474539520,
+        "physicalMemoryUsage" : 319881216,
+        "heapUsage" : 740294656
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164121,
+    "taskID" : "task_1369942127770_1206_m_000019",
+    "taskType" : "MAP",
+    "finishTime" : 1371222186145,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222166303,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222186145,
+      "attemptID" : "attempt_1369942127770_1206_m_000019_0",
+      "clockSplits" : [ 3008, 3009, 3009, 1882, 895, 895, 893, 819, 819, 819, 2062, 1653 ],
+      "cpuUsages" : [ 1646, 1647, 1647, 1320, 1034, 1034, 1032, 934, 934, 935, 941, 966 ],
+      "vmemKbytes" : [ 203217, 609652, 1016088, 1364807, 1409140, 1409139, 1409140, 1409139, 1409140, 1409140, 1409139, 1409140 ],
+      "physMemKbytes" : [ 42475, 127426, 212377, 285272, 294585, 294637, 294690, 295048, 295688, 296328, 296949, 297136 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14150,
+        "virtualMemoryUsage" : 1442959360,
+        "physicalMemoryUsage" : 304185344,
+        "heapUsage" : 740294656
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164122,
+    "taskID" : "task_1369942127770_1206_m_000020",
+    "taskType" : "MAP",
+    "finishTime" : 1371222188294,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222166304,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222188294,
+      "attemptID" : "attempt_1369942127770_1206_m_000020_0",
+      "clockSplits" : [ 2521, 2522, 2521, 2522, 1166, 875, 875, 3843, 796, 796, 796, 2750 ],
+      "cpuUsages" : [ 1465, 1465, 1465, 1465, 1165, 1100, 1100, 1152, 745, 746, 745, 1157 ],
+      "vmemKbytes" : [ 169996, 509988, 849980, 1189972, 1414887, 1420227, 1420228, 1420227, 1420228, 1420228, 1420227, 1420228 ],
+      "physMemKbytes" : [ 37258, 111774, 186290, 260806, 310285, 311992, 312537, 313043, 312040, 310217, 308394, 306622 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13770,
+        "virtualMemoryUsage" : 1454313472,
+        "physicalMemoryUsage" : 313397248,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164122,
+    "taskID" : "task_1369942127770_1206_m_000021",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185112,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222166306,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185112,
+      "attemptID" : "attempt_1369942127770_1206_m_000021_0",
+      "clockSplits" : [ 1800, 1801, 1800, 1801, 1801, 1639, 1110, 1109, 1053, 976, 977, 2929 ],
+      "cpuUsages" : [ 1297, 1297, 1297, 1297, 1297, 1248, 1084, 1085, 966, 809, 809, 1224 ],
+      "vmemKbytes" : [ 125011, 375035, 625059, 875082, 1125106, 1368301, 1441708, 1441707, 1441708, 1441708, 1441707, 1441708 ],
+      "physMemKbytes" : [ 27270, 81812, 136354, 190895, 245438, 298570, 316659, 319596, 322165, 321755, 320696, 319661 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13710,
+        "virtualMemoryUsage" : 1476308992,
+        "physicalMemoryUsage" : 326963200,
+        "heapUsage" : 740360192
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164122,
+    "taskID" : "task_1369942127770_1206_m_000022",
+    "taskType" : "MAP",
+    "finishTime" : 1371222186222,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222166307,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222186222,
+      "attemptID" : "attempt_1369942127770_1206_m_000022_0",
+      "clockSplits" : [ 1673, 1674, 1674, 1674, 1674, 1674, 1281, 1231, 1150, 1000, 1000, 3869 ],
+      "cpuUsages" : [ 1270, 1271, 1271, 1270, 1271, 1271, 1189, 1180, 1050, 811, 810, 1176 ],
+      "vmemKbytes" : [ 116283, 348851, 581419, 813986, 1046555, 1279122, 1420532, 1422059, 1422060, 1422060, 1422059, 1422060 ],
+      "physMemKbytes" : [ 24619, 73859, 123098, 172337, 221577, 270816, 300537, 300304, 299627, 297553, 295072, 292670 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13920,
+        "virtualMemoryUsage" : 1456189440,
+        "physicalMemoryUsage" : 298930176,
+        "heapUsage" : 740425728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164123,
+    "taskID" : "task_1369942127770_1206_m_000023",
+    "taskType" : "MAP",
+    "finishTime" : 1371222186145,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222166345,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222186145,
+      "attemptID" : "attempt_1369942127770_1206_m_000023_0",
+      "clockSplits" : [ 1890, 1890, 1890, 1890, 1890, 1603, 1310, 1285, 1093, 1093, 2285, 1599 ],
+      "cpuUsages" : [ 1300, 1301, 1300, 1301, 1301, 1183, 1064, 1042, 878, 877, 908, 985 ],
+      "vmemKbytes" : [ 130897, 392693, 654489, 916284, 1178080, 1407818, 1441216, 1441215, 1441216, 1441216, 1441215, 1441216 ],
+      "physMemKbytes" : [ 28778, 86335, 143893, 201450, 259007, 309525, 316931, 316984, 315303, 312502, 309811, 309093 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13500,
+        "virtualMemoryUsage" : 1475805184,
+        "physicalMemoryUsage" : 316432384,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164123,
+    "taskID" : "task_1369942127770_1206_m_000024",
+    "taskType" : "MAP",
+    "finishTime" : 1371222189046,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222166312,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222189046,
+      "attemptID" : "attempt_1369942127770_1206_m_000024_0",
+      "clockSplits" : [ 2253, 2253, 2253, 2254, 1847, 969, 969, 7872, 514, 515, 514, 515 ],
+      "cpuUsages" : [ 1355, 1356, 1356, 1355, 1273, 1091, 1092, 1191, 1000, 1000, 1000, 1001 ],
+      "vmemKbytes" : [ 153860, 461581, 769302, 1077023, 1369366, 1441319, 1441320, 1441319, 1441320, 1441320, 1441319, 1441320 ],
+      "physMemKbytes" : [ 30297, 90891, 151486, 212080, 269690, 284519, 285383, 286252, 287524, 289042, 290561, 292080 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14070,
+        "virtualMemoryUsage" : 1475911680,
+        "physicalMemoryUsage" : 299868160,
+        "heapUsage" : 677838848
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164123,
+    "taskID" : "task_1369942127770_1206_m_000025",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185135,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222166313,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185135,
+      "attemptID" : "attempt_1369942127770_1206_m_000025_0",
+      "clockSplits" : [ 2136, 2136, 2136, 2137, 2130, 1075, 1075, 1048, 844, 844, 844, 2412 ],
+      "cpuUsages" : [ 1387, 1387, 1388, 1387, 1386, 1053, 1052, 1035, 894, 895, 895, 1351 ],
+      "vmemKbytes" : [ 142390, 427170, 711951, 996731, 1281508, 1422399, 1422400, 1422399, 1422400, 1422400, 1422399, 1422400 ],
+      "physMemKbytes" : [ 26260, 78782, 131304, 183825, 236347, 262453, 262696, 262931, 262484, 261596, 260708, 259812 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14110,
+        "virtualMemoryUsage" : 1456537600,
+        "physicalMemoryUsage" : 265564160,
+        "heapUsage" : 610598912
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164124,
+    "taskID" : "task_1369942127770_1206_m_000026",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185121,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222166319,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185121,
+      "attemptID" : "attempt_1369942127770_1206_m_000026_0",
+      "clockSplits" : [ 2178, 2179, 2178, 2179, 1980, 1194, 1194, 904, 713, 713, 713, 2671 ],
+      "cpuUsages" : [ 1365, 1365, 1365, 1365, 1309, 1089, 1089, 917, 805, 805, 805, 1301 ],
+      "vmemKbytes" : [ 147880, 443640, 739400, 1035160, 1324892, 1419083, 1419084, 1419083, 1419084, 1419084, 1419083, 1419084 ],
+      "physMemKbytes" : [ 29159, 87477, 145795, 204112, 261297, 281682, 284343, 286121, 284301, 282096, 279891, 278128 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13580,
+        "virtualMemoryUsage" : 1453142016,
+        "physicalMemoryUsage" : 286785536,
+        "heapUsage" : 609091584
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164124,
+    "taskID" : "task_1369942127770_1206_m_000027",
+    "taskType" : "MAP",
+    "finishTime" : 1371222186069,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222166318,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222186069,
+      "attemptID" : "attempt_1369942127770_1206_m_000027_0",
+      "clockSplits" : [ 2248, 2249, 2249, 2248, 1776, 1068, 1067, 993, 918, 918, 2288, 1622 ],
+      "cpuUsages" : [ 1367, 1368, 1367, 1368, 1258, 1097, 1096, 966, 836, 836, 879, 1172 ],
+      "vmemKbytes" : [ 154759, 464278, 773798, 1083317, 1368023, 1423659, 1423660, 1423659, 1423660, 1423660, 1423659, 1423660 ],
+      "physMemKbytes" : [ 30750, 92253, 153756, 215259, 271847, 283056, 283244, 283187, 281664, 279894, 278154, 278631 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13680,
+        "virtualMemoryUsage" : 1457827840,
+        "physicalMemoryUsage" : 286220288,
+        "heapUsage" : 592445440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164124,
+    "taskID" : "task_1369942127770_1206_m_000028",
+    "taskType" : "MAP",
+    "finishTime" : 1371222185115,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222166327,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222185115,
+      "attemptID" : "attempt_1369942127770_1206_m_000028_0",
+      "clockSplits" : [ 2169, 2170, 2170, 2170, 2072, 953, 954, 953, 890, 876, 876, 2529 ],
+      "cpuUsages" : [ 1402, 1402, 1403, 1402, 1374, 1043, 1042, 1043, 920, 896, 895, 1618 ],
+      "vmemKbytes" : [ 146031, 438093, 730155, 1022217, 1313341, 1436891, 1436892, 1436891, 1436892, 1436892, 1436891, 1436892 ],
+      "physMemKbytes" : [ 28835, 86506, 144177, 201848, 259347, 285982, 289861, 293740, 300259, 311707, 323267, 334513 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14440,
+        "virtualMemoryUsage" : 1471377408,
+        "physicalMemoryUsage" : 346238976,
+        "heapUsage" : 679346176
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164124,
+    "taskID" : "task_1369942127770_1206_m_000029",
+    "taskType" : "MAP",
+    "finishTime" : 1371222186085,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222166330,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222186085,
+      "attemptID" : "attempt_1369942127770_1206_m_000029_0",
+      "clockSplits" : [ 2131, 2132, 2132, 2132, 2131, 1196, 1106, 1107, 1114, 1115, 2070, 1384 ],
+      "cpuUsages" : [ 1316, 1317, 1317, 1317, 1317, 1079, 1056, 1048, 986, 985, 1017, 1075 ],
+      "vmemKbytes" : [ 141371, 424113, 706855, 989597, 1272340, 1437442, 1438532, 1438531, 1438532, 1438532, 1438531, 1438532 ],
+      "physMemKbytes" : [ 27222, 81669, 136115, 190561, 245008, 277502, 279390, 281042, 280013, 277262, 274876, 276619 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13830,
+        "virtualMemoryUsage" : 1473056768,
+        "physicalMemoryUsage" : 284745728,
+        "heapUsage" : 608043008
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164125,
+    "taskID" : "task_1369942127770_1206_m_000030",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209777,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222186223,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209777,
+      "attemptID" : "attempt_1369942127770_1206_m_000030_0",
+      "clockSplits" : [ 3325, 3325, 3326, 1633, 1137, 1137, 1676, 1628, 916, 916, 917, 3460 ],
+      "cpuUsages" : [ 1614, 1615, 1615, 1232, 1121, 1121, 1189, 1174, 1017, 1017, 1017, 1238 ],
+      "vmemKbytes" : [ 220995, 662987, 1104979, 1414799, 1426152, 1426151, 1426152, 1426151, 1426152, 1426152, 1426151, 1426152 ],
+      "physMemKbytes" : [ 46111, 138333, 230555, 295761, 299962, 301841, 304098, 306831, 306453, 304076, 301699, 299750 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 15080,
+        "virtualMemoryUsage" : 1460379648,
+        "physicalMemoryUsage" : 306688000,
+        "heapUsage" : 745209856
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164125,
+    "taskID" : "task_1369942127770_1206_m_000031",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209814,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222186224,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209814,
+      "attemptID" : "attempt_1369942127770_1206_m_000031_0",
+      "clockSplits" : [ 2788, 2789, 2789, 2665, 1430, 1431, 1710, 1647, 900, 899, 900, 3438 ],
+      "cpuUsages" : [ 1386, 1387, 1387, 1361, 1109, 1109, 1131, 1115, 964, 965, 964, 1252 ],
+      "vmemKbytes" : [ 182198, 546594, 910990, 1273865, 1424288, 1424287, 1424288, 1424287, 1424288, 1424288, 1424287, 1424288 ],
+      "physMemKbytes" : [ 38354, 115062, 191770, 268152, 298904, 297349, 296494, 296717, 296215, 295239, 294262, 293471 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14390,
+        "virtualMemoryUsage" : 1458470912,
+        "physicalMemoryUsage" : 302673920,
+        "heapUsage" : 724500480
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164125,
+    "taskID" : "task_1369942127770_1206_m_000032",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209796,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222186230,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209796,
+      "attemptID" : "attempt_1369942127770_1206_m_000032_0",
+      "clockSplits" : [ 3446, 3446, 3447, 1666, 1610, 1052, 1052, 1212, 2392, 1340, 1113, 1783 ],
+      "cpuUsages" : [ 1574, 1575, 1575, 1192, 1179, 1036, 1036, 1060, 1242, 897, 823, 1161 ],
+      "vmemKbytes" : [ 236125, 708377, 1180629, 1421325, 1421348, 1421347, 1421348, 1421347, 1421348, 1421348, 1421347, 1421348 ],
+      "physMemKbytes" : [ 51196, 153591, 255986, 308231, 308353, 309496, 311445, 313379, 314141, 313513, 311665, 309787 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14350,
+        "virtualMemoryUsage" : 1455460352,
+        "physicalMemoryUsage" : 316284928,
+        "heapUsage" : 741015552
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164126,
+    "taskID" : "task_1369942127770_1206_m_000033",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209114,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222186269,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209114,
+      "attemptID" : "attempt_1369942127770_1206_m_000033_0",
+      "clockSplits" : [ 2867, 2868, 2867, 2868, 1157, 1130, 1219, 2051, 1397, 925, 924, 2567 ],
+      "cpuUsages" : [ 1397, 1397, 1397, 1397, 1133, 1129, 1138, 1227, 1043, 911, 911, 1420 ],
+      "vmemKbytes" : [ 177507, 532523, 887539, 1242554, 1425454, 1425495, 1425496, 1425495, 1425496, 1425496, 1425495, 1425496 ],
+      "physMemKbytes" : [ 35271, 105813, 176355, 246896, 284278, 286428, 288564, 289767, 290547, 292311, 294191, 296014 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14500,
+        "virtualMemoryUsage" : 1459707904,
+        "physicalMemoryUsage" : 303673344,
+        "heapUsage" : 669974528
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164126,
+    "taskID" : "task_1369942127770_1206_m_000034",
+    "taskType" : "MAP",
+    "finishTime" : 1371222205072,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222186230,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222205072,
+      "attemptID" : "attempt_1369942127770_1206_m_000034_0",
+      "clockSplits" : [ 1942, 1943, 1943, 1942, 1943, 1831, 787, 788, 788, 889, 1494, 2545 ],
+      "cpuUsages" : [ 1226, 1226, 1227, 1226, 1227, 1208, 1040, 1039, 1040, 1009, 828, 1724 ],
+      "vmemKbytes" : [ 121272, 363818, 606363, 848908, 1091454, 1332855, 1430977, 1429650, 1428324, 1427011, 1426523, 1426524 ],
+      "physMemKbytes" : [ 27249, 81750, 136250, 190750, 245251, 299492, 321349, 320728, 320107, 319489, 319062, 318747 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14020,
+        "virtualMemoryUsage" : 1460760576,
+        "physicalMemoryUsage" : 326189056,
+        "heapUsage" : 668139520
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164126,
+    "taskID" : "task_1369942127770_1206_m_000035",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209265,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222186231,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209265,
+      "attemptID" : "attempt_1369942127770_1206_m_000035_0",
+      "clockSplits" : [ 2312, 2313, 2313, 2313, 2313, 2097, 1450, 1407, 1083, 1084, 3675, 312 ],
+      "cpuUsages" : [ 1166, 1167, 1167, 1166, 1167, 1149, 1093, 1075, 945, 945, 1023, 1307 ],
+      "vmemKbytes" : [ 123562, 370687, 617812, 864937, 1112063, 1351529, 1421224, 1421223, 1421224, 1421224, 1421223, 1421224 ],
+      "physMemKbytes" : [ 23849, 71548, 119247, 166946, 214646, 260983, 277134, 280864, 282024, 281525, 281038, 280933 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13460,
+        "virtualMemoryUsage" : 1455333376,
+        "physicalMemoryUsage" : 293855232,
+        "heapUsage" : 645595136
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164127,
+    "taskID" : "task_1369942127770_1206_m_000036",
+    "taskType" : "MAP",
+    "finishTime" : 1371222205027,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222186270,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222205027,
+      "attemptID" : "attempt_1369942127770_1206_m_000036_0",
+      "clockSplits" : [ 1457, 1458, 1457, 1458, 1458, 1457, 1588, 1594, 1020, 1007, 1007, 3788 ],
+      "cpuUsages" : [ 1146, 1146, 1146, 1146, 1147, 1146, 1350, 1361, 1032, 1024, 1024, 1372 ],
+      "vmemKbytes" : [ 117533, 352601, 587669, 822736, 1057804, 1292871, 1420975, 1421223, 1421224, 1421224, 1421223, 1421224 ],
+      "physMemKbytes" : [ 25662, 76986, 128310, 179634, 230959, 282283, 311405, 313987, 314079, 311498, 308915, 307356 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14040,
+        "virtualMemoryUsage" : 1455333376,
+        "physicalMemoryUsage" : 314486784,
+        "heapUsage" : 725483520
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164127,
+    "taskID" : "task_1369942127770_1206_m_000037",
+    "taskType" : "MAP",
+    "finishTime" : 1371222204802,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222186229,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222204802,
+      "attemptID" : "attempt_1369942127770_1206_m_000037_0",
+      "clockSplits" : [ 2817, 2817, 2817, 1469, 1026, 1027, 1211, 1334, 3276, 257, 257, 258 ],
+      "cpuUsages" : [ 1465, 1466, 1466, 1237, 1161, 1162, 1220, 1260, 1163, 850, 850, 850 ],
+      "vmemKbytes" : [ 221437, 664313, 1107189, 1424591, 1438128, 1438127, 1438128, 1438127, 1438128, 1438128, 1438127, 1438128 ],
+      "physMemKbytes" : [ 47520, 142560, 237600, 305733, 308702, 308767, 308909, 309355, 309754, 308145, 305672, 303200 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14150,
+        "virtualMemoryUsage" : 1472643072,
+        "physicalMemoryUsage" : 309211136,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164127,
+    "taskID" : "task_1369942127770_1206_m_000038",
+    "taskType" : "MAP",
+    "finishTime" : 1371222205071,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222186231,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222205071,
+      "attemptID" : "attempt_1369942127770_1206_m_000038_0",
+      "clockSplits" : [ 2279, 2280, 2280, 2280, 869, 832, 833, 833, 889, 890, 889, 3531 ],
+      "cpuUsages" : [ 1331, 1332, 1332, 1332, 1164, 1161, 1160, 1159, 1012, 1011, 1012, 1254 ],
+      "vmemKbytes" : [ 176677, 530031, 883386, 1236740, 1422008, 1422115, 1422116, 1422115, 1422116, 1422116, 1422115, 1422116 ],
+      "physMemKbytes" : [ 37600, 112801, 188002, 263203, 303425, 305112, 306777, 308442, 309142, 308918, 308694, 308464 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14390,
+        "virtualMemoryUsage" : 1456246784,
+        "physicalMemoryUsage" : 315645952,
+        "heapUsage" : 745013248
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164127,
+    "taskID" : "task_1369942127770_1206_m_000039",
+    "taskType" : "MAP",
+    "finishTime" : 1371222204844,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222186270,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222204844,
+      "attemptID" : "attempt_1369942127770_1206_m_000039_0",
+      "clockSplits" : [ 1520, 1521, 1521, 1520, 1521, 1502, 1411, 1412, 1054, 1023, 1024, 3236 ],
+      "cpuUsages" : [ 1201, 1201, 1201, 1201, 1201, 1219, 1301, 1301, 1078, 1060, 1059, 997 ],
+      "vmemKbytes" : [ 123345, 370038, 616730, 863421, 1110114, 1353144, 1437648, 1437647, 1437648, 1437648, 1437647, 1437648 ],
+      "physMemKbytes" : [ 26607, 79823, 133038, 186253, 239469, 291949, 312598, 316277, 317760, 316265, 314752, 313761 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14310,
+        "virtualMemoryUsage" : 1472151552,
+        "physicalMemoryUsage" : 321114112,
+        "heapUsage" : 738000896
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164128,
+    "taskID" : "task_1369942127770_1206_m_000040",
+    "taskType" : "MAP",
+    "finishTime" : 1371222208051,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222187226,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222208051,
+      "attemptID" : "attempt_1369942127770_1206_m_000040_0",
+      "clockSplits" : [ 2708, 2709, 2709, 2708, 1324, 1241, 1170, 983, 983, 3572, 201, 201 ],
+      "cpuUsages" : [ 1449, 1450, 1449, 1450, 1163, 1146, 1099, 972, 971, 970, 945, 946 ],
+      "vmemKbytes" : [ 173689, 521067, 868445, 1215823, 1408585, 1409139, 1409140, 1409139, 1409140, 1409140, 1409139, 1409140 ],
+      "physMemKbytes" : [ 37436, 112308, 187180, 262052, 304948, 308090, 311012, 311933, 312102, 312258, 310764, 308111 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14260,
+        "virtualMemoryUsage" : 1442959360,
+        "physicalMemoryUsage" : 314261504,
+        "heapUsage" : 739639296
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164128,
+    "taskID" : "task_1369942127770_1206_m_000041",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209764,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222187225,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209764,
+      "attemptID" : "attempt_1369942127770_1206_m_000041_0",
+      "clockSplits" : [ 2460, 2461, 2461, 2366, 1711, 1637, 1437, 1554, 2430, 3338, 136, 137 ],
+      "cpuUsages" : [ 1422, 1423, 1423, 1400, 1245, 1214, 1134, 1139, 1181, 1020, 984, 985 ],
+      "vmemKbytes" : [ 183430, 550292, 917154, 1281033, 1420664, 1420663, 1420664, 1420663, 1420664, 1420664, 1420663, 1420664 ],
+      "physMemKbytes" : [ 38854, 116562, 194270, 271356, 301598, 302728, 304891, 307428, 308423, 307956, 306560, 305139 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14710,
+        "virtualMemoryUsage" : 1454759936,
+        "physicalMemoryUsage" : 311668736,
+        "heapUsage" : 734986240
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164129,
+    "taskID" : "task_1369942127770_1206_m_000042",
+    "taskType" : "MAP",
+    "finishTime" : 1371222210013,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222188236,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222210013,
+      "attemptID" : "attempt_1369942127770_1206_m_000042_0",
+      "clockSplits" : [ 2345, 2345, 2346, 2345, 2345, 1441, 1165, 1139, 942, 942, 942, 3297 ],
+      "cpuUsages" : [ 1329, 1330, 1330, 1330, 1330, 1110, 1042, 1028, 918, 919, 918, 1176 ],
+      "vmemKbytes" : [ 135997, 407991, 679985, 951978, 1223973, 1416016, 1423416, 1423415, 1423416, 1423416, 1423415, 1423416 ],
+      "physMemKbytes" : [ 29954, 89862, 149770, 209678, 269587, 312158, 314689, 315603, 315555, 314887, 314219, 313779 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13870,
+        "virtualMemoryUsage" : 1457577984,
+        "physicalMemoryUsage" : 321241088,
+        "heapUsage" : 745275392
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164129,
+    "taskID" : "task_1369942127770_1206_m_000043",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209829,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222188247,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209829,
+      "attemptID" : "attempt_1369942127770_1206_m_000043_0",
+      "clockSplits" : [ 2418, 2419, 2419, 2159, 1443, 1453, 1585, 1514, 988, 987, 988, 3120 ],
+      "cpuUsages" : [ 1496, 1497, 1497, 1419, 1200, 1197, 1139, 1120, 984, 983, 984, 1064 ],
+      "vmemKbytes" : [ 192713, 578139, 963566, 1335372, 1439240, 1439239, 1439240, 1439239, 1439240, 1439240, 1439239, 1439240 ],
+      "physMemKbytes" : [ 41062, 123187, 205312, 284536, 306688, 306724, 308963, 312869, 313477, 311955, 310433, 309628 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14730,
+        "virtualMemoryUsage" : 1473781760,
+        "physicalMemoryUsage" : 316993536,
+        "heapUsage" : 742588416
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164129,
+    "taskID" : "task_1369942127770_1206_m_000044",
+    "taskType" : "MAP",
+    "finishTime" : 1371222205147,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222188243,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222205147,
+      "attemptID" : "attempt_1369942127770_1206_m_000044_0",
+      "clockSplits" : [ 1997, 1998, 1998, 1998, 1656, 1015, 1015, 992, 821, 821, 821, 1763 ],
+      "cpuUsages" : [ 1362, 1363, 1363, 1363, 1290, 1156, 1155, 1116, 828, 828, 828, 1418 ],
+      "vmemKbytes" : [ 154789, 464368, 773947, 1083526, 1374102, 1436109, 1431198, 1426321, 1424416, 1424416, 1424415, 1424416 ],
+      "physMemKbytes" : [ 33320, 99960, 166601, 233241, 295602, 306484, 302294, 298121, 295429, 293687, 291944, 290254 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14070,
+        "virtualMemoryUsage" : 1458601984,
+        "physicalMemoryUsage" : 296701952,
+        "heapUsage" : 740294656
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164130,
+    "taskID" : "task_1369942127770_1206_m_000045",
+    "taskType" : "MAP",
+    "finishTime" : 1371222208888,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222188284,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222208888,
+      "attemptID" : "attempt_1369942127770_1206_m_000045_0",
+      "clockSplits" : [ 2408, 2408, 2409, 2408, 1248, 994, 993, 1546, 1811, 1173, 1142, 2044 ],
+      "cpuUsages" : [ 1442, 1443, 1443, 1443, 1216, 1167, 1167, 1242, 1278, 871, 851, 1187 ],
+      "vmemKbytes" : [ 170497, 511493, 852489, 1193484, 1419688, 1425179, 1425180, 1425179, 1425180, 1425180, 1425179, 1425180 ],
+      "physMemKbytes" : [ 36659, 109977, 183295, 256613, 305816, 308651, 310334, 311695, 312050, 312197, 312184, 312178 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14750,
+        "virtualMemoryUsage" : 1459384320,
+        "physicalMemoryUsage" : 319713280,
+        "heapUsage" : 733020160
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164130,
+    "taskID" : "task_1369942127770_1206_m_000046",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209764,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222188246,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209764,
+      "attemptID" : "attempt_1369942127770_1206_m_000046_0",
+      "clockSplits" : [ 2411, 2412, 2411, 2412, 1354, 1182, 1201, 1287, 1288, 1246, 1233, 3075 ],
+      "cpuUsages" : [ 1429, 1430, 1430, 1430, 1204, 1167, 1149, 1069, 1069, 932, 888, 1233 ],
+      "vmemKbytes" : [ 170204, 510614, 851024, 1191433, 1405939, 1409271, 1409272, 1409271, 1409272, 1409272, 1409271, 1409272 ],
+      "physMemKbytes" : [ 36770, 110311, 183853, 257394, 302847, 301188, 298826, 298087, 298200, 297470, 294709, 291944 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14430,
+        "virtualMemoryUsage" : 1443094528,
+        "physicalMemoryUsage" : 298102784,
+        "heapUsage" : 740622336
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164130,
+    "taskID" : "task_1369942127770_1206_m_000047",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209770,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222188244,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209770,
+      "attemptID" : "attempt_1369942127770_1206_m_000047_0",
+      "clockSplits" : [ 2359, 2360, 2360, 2360, 991, 967, 967, 1864, 1869, 1009, 1009, 3406 ],
+      "cpuUsages" : [ 1381, 1382, 1381, 1382, 1111, 1107, 1107, 1332, 1274, 926, 926, 1181 ],
+      "vmemKbytes" : [ 175422, 526266, 877111, 1227955, 1409352, 1409403, 1409404, 1409403, 1409404, 1409404, 1409403, 1409404 ],
+      "physMemKbytes" : [ 38481, 115443, 192406, 269368, 308485, 307099, 305702, 305330, 307856, 308596, 308675, 308751 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14490,
+        "virtualMemoryUsage" : 1443229696,
+        "physicalMemoryUsage" : 316166144,
+        "heapUsage" : 743505920
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164130,
+    "taskID" : "task_1369942127770_1206_m_000048",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209758,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222188248,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209758,
+      "attemptID" : "attempt_1369942127770_1206_m_000048_0",
+      "clockSplits" : [ 2073, 2074, 2074, 2074, 2073, 1639, 1272, 1276, 1301, 1301, 1674, 1842 ],
+      "cpuUsages" : [ 1234, 1235, 1235, 1235, 1235, 1183, 1139, 1135, 1103, 1104, 909, 823 ],
+      "vmemKbytes" : [ 129783, 389349, 648915, 908480, 1168047, 1389454, 1416722, 1416815, 1416852, 1416852, 1416851, 1416852 ],
+      "physMemKbytes" : [ 25359, 76080, 126801, 177521, 228242, 271580, 277354, 277862, 277694, 277090, 276628, 276597 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13990,
+        "virtualMemoryUsage" : 1450856448,
+        "physicalMemoryUsage" : 287096832,
+        "heapUsage" : 598081536
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164131,
+    "taskID" : "task_1369942127770_1206_m_000049",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209877,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222188245,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209877,
+      "attemptID" : "attempt_1369942127770_1206_m_000049_0",
+      "clockSplits" : [ 2394, 2395, 2394, 2395, 2395, 1860, 1150, 1150, 985, 905, 904, 2700 ],
+      "cpuUsages" : [ 1252, 1253, 1253, 1253, 1253, 1165, 1047, 1048, 897, 822, 823, 1324 ],
+      "vmemKbytes" : [ 126489, 379468, 632447, 885426, 1138405, 1368134, 1409448, 1409495, 1409533, 1409536, 1409535, 1409536 ],
+      "physMemKbytes" : [ 26096, 78289, 130482, 182675, 234868, 282278, 290926, 291083, 290759, 288885, 286894, 284958 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13390,
+        "virtualMemoryUsage" : 1443364864,
+        "physicalMemoryUsage" : 291172352,
+        "heapUsage" : 728629248
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164131,
+    "taskID" : "task_1369942127770_1206_m_000050",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209871,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222188246,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209871,
+      "attemptID" : "attempt_1369942127770_1206_m_000050_0",
+      "clockSplits" : [ 2330, 2330, 2331, 2330, 2331, 1760, 1284, 1228, 809, 809, 809, 3269 ],
+      "cpuUsages" : [ 1299, 1300, 1300, 1299, 1300, 1110, 952, 941, 864, 865, 864, 1296 ],
+      "vmemKbytes" : [ 129180, 387540, 645900, 904260, 1162621, 1382642, 1409412, 1409411, 1409412, 1409412, 1409411, 1409412 ],
+      "physMemKbytes" : [ 27390, 82173, 136956, 191739, 246522, 293591, 301780, 304563, 305591, 305485, 305379, 305268 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13390,
+        "virtualMemoryUsage" : 1443237888,
+        "physicalMemoryUsage" : 312508416,
+        "heapUsage" : 745275392
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164131,
+    "taskID" : "task_1369942127770_1206_m_000051",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209798,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222189249,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209798,
+      "attemptID" : "attempt_1369942127770_1206_m_000051_0",
+      "clockSplits" : [ 2459, 2460, 2460, 2460, 2460, 1450, 922, 923, 947, 1056, 1056, 1891 ],
+      "cpuUsages" : [ 1238, 1239, 1239, 1239, 1239, 1071, 982, 982, 962, 870, 869, 1390 ],
+      "vmemKbytes" : [ 133415, 400246, 667077, 933908, 1200739, 1410001, 1425708, 1425707, 1425708, 1425708, 1425707, 1425708 ],
+      "physMemKbytes" : [ 29016, 87050, 145083, 203116, 261151, 306685, 310195, 310295, 310356, 308899, 306668, 304504 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13320,
+        "virtualMemoryUsage" : 1459924992,
+        "physicalMemoryUsage" : 311140352,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164132,
+    "taskID" : "task_1369942127770_1206_m_000052",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209546,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222189252,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209546,
+      "attemptID" : "attempt_1369942127770_1206_m_000052_0",
+      "clockSplits" : [ 2113, 2113, 2113, 2113, 1296, 902, 902, 1007, 1429, 1434, 1749, 3118 ],
+      "cpuUsages" : [ 1343, 1343, 1343, 1343, 1163, 1076, 1077, 1044, 916, 918, 1010, 1614 ],
+      "vmemKbytes" : [ 165998, 497994, 829990, 1161986, 1418463, 1436051, 1436052, 1435986, 1433726, 1430398, 1428787, 1428788 ],
+      "physMemKbytes" : [ 31862, 95586, 159310, 223034, 272810, 278461, 280865, 283418, 290959, 300928, 308895, 314795 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14190,
+        "virtualMemoryUsage" : 1463078912,
+        "physicalMemoryUsage" : 324112384,
+        "heapUsage" : 672333824
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164132,
+    "taskID" : "task_1369942127770_1206_m_000053",
+    "taskType" : "MAP",
+    "finishTime" : 1371222211732,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222189248,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222211732,
+      "attemptID" : "attempt_1369942127770_1206_m_000053_0",
+      "clockSplits" : [ 3379, 3380, 3379, 3380, 1214, 1180, 1480, 2139, 2348, 200, 200, 200 ],
+      "cpuUsages" : [ 1382, 1382, 1382, 1382, 1146, 1141, 1199, 1326, 847, 768, 767, 768 ],
+      "vmemKbytes" : [ 176837, 530511, 884186, 1237861, 1420070, 1420111, 1420112, 1420111, 1420112, 1420112, 1420111, 1420112 ],
+      "physMemKbytes" : [ 37701, 113105, 188508, 263911, 302843, 303027, 303274, 304566, 304973, 303294, 301579, 299865 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13490,
+        "virtualMemoryUsage" : 1454194688,
+        "physicalMemoryUsage" : 306184192,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164132,
+    "taskID" : "task_1369942127770_1206_m_000054",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209794,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222189250,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209794,
+      "attemptID" : "attempt_1369942127770_1206_m_000054_0",
+      "clockSplits" : [ 1915, 1915, 1915, 1915, 1915, 1152, 1100, 1150, 1523, 1535, 1698, 2805 ],
+      "cpuUsages" : [ 1363, 1363, 1363, 1363, 1363, 1198, 1188, 1163, 976, 977, 997, 1316 ],
+      "vmemKbytes" : [ 140637, 421911, 703185, 984458, 1265733, 1423312, 1423856, 1423855, 1423856, 1423856, 1423855, 1423856 ],
+      "physMemKbytes" : [ 30869, 92607, 154346, 216085, 277824, 313467, 315980, 318362, 319339, 319401, 317453, 314073 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14630,
+        "virtualMemoryUsage" : 1458028544,
+        "physicalMemoryUsage" : 320655360,
+        "heapUsage" : 740294656
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164133,
+    "taskID" : "task_1369942127770_1206_m_000055",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209829,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222190266,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209829,
+      "attemptID" : "attempt_1369942127770_1206_m_000055_0",
+      "clockSplits" : [ 2156, 2157, 2157, 2157, 1560, 923, 923, 951, 1166, 1165, 3553, 294 ],
+      "cpuUsages" : [ 1567, 1568, 1568, 1568, 1331, 1078, 1079, 1081, 1094, 1094, 1067, 1035 ],
+      "vmemKbytes" : [ 159573, 478720, 797867, 1117014, 1398782, 1441271, 1441272, 1441271, 1441272, 1441272, 1441271, 1441272 ],
+      "physMemKbytes" : [ 34072, 102218, 170364, 238509, 298798, 308785, 309842, 310878, 310220, 308476, 306900, 306628 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 15280,
+        "virtualMemoryUsage" : 1475862528,
+        "physicalMemoryUsage" : 313933824,
+        "heapUsage" : 740491264
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164133,
+    "taskID" : "task_1369942127770_1206_m_000056",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209766,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222190265,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209766,
+      "attemptID" : "attempt_1369942127770_1206_m_000056_0",
+      "clockSplits" : [ 1671, 1672, 1672, 1672, 1671, 1485, 1304, 1382, 1955, 1637, 1335, 2040 ],
+      "cpuUsages" : [ 1307, 1307, 1308, 1307, 1307, 1228, 1152, 1137, 1033, 976, 924, 1214 ],
+      "vmemKbytes" : [ 129345, 388038, 646731, 905424, 1164117, 1389407, 1420696, 1420695, 1420696, 1420696, 1420695, 1420696 ],
+      "physMemKbytes" : [ 29283, 87851, 146419, 204986, 263554, 314885, 324186, 326689, 327672, 327261, 324457, 321292 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14200,
+        "virtualMemoryUsage" : 1454792704,
+        "physicalMemoryUsage" : 327684096,
+        "heapUsage" : 659947520
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164133,
+    "taskID" : "task_1369942127770_1206_m_000057",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209780,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222190273,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209780,
+      "attemptID" : "attempt_1369942127770_1206_m_000057_0",
+      "clockSplits" : [ 1937, 1937, 1937, 1937, 1937, 1808, 921, 921, 920, 1160, 1247, 2840 ],
+      "cpuUsages" : [ 1261, 1262, 1262, 1261, 1262, 1229, 1008, 1008, 1007, 884, 839, 1247 ],
+      "vmemKbytes" : [ 120936, 362811, 604686, 846560, 1088435, 1328359, 1420532, 1420531, 1420532, 1420532, 1420531, 1420532 ],
+      "physMemKbytes" : [ 26360, 79080, 131800, 184520, 237241, 289556, 311113, 313482, 315853, 316764, 313891, 310918 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13530,
+        "virtualMemoryUsage" : 1454624768,
+        "physicalMemoryUsage" : 317476864,
+        "heapUsage" : 728170496
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164133,
+    "taskID" : "task_1369942127770_1206_m_000058",
+    "taskType" : "MAP",
+    "finishTime" : 1371222209289,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222190266,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222209289,
+      "attemptID" : "attempt_1369942127770_1206_m_000058_0",
+      "clockSplits" : [ 1567, 1568, 1568, 1568, 1568, 1568, 1852, 2691, 800, 800, 799, 2669 ],
+      "cpuUsages" : [ 1236, 1236, 1237, 1236, 1237, 1236, 1292, 1435, 895, 895, 895, 1280 ],
+      "vmemKbytes" : [ 104429, 313288, 522147, 731006, 939866, 1148725, 1353137, 1418911, 1418912, 1418912, 1418911, 1418912 ],
+      "physMemKbytes" : [ 22528, 67586, 112643, 157700, 202758, 247815, 292006, 309112, 309629, 307720, 305811, 303966 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14110,
+        "virtualMemoryUsage" : 1452965888,
+        "physicalMemoryUsage" : 310743040,
+        "heapUsage" : 740360192
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164134,
+    "taskID" : "task_1369942127770_1206_m_000059",
+    "taskType" : "MAP",
+    "finishTime" : 1371222211562,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222192248,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222211562,
+      "attemptID" : "attempt_1369942127770_1206_m_000059_0",
+      "clockSplits" : [ 2767, 2767, 2768, 2767, 849, 819, 819, 967, 2079, 2282, 212, 213 ],
+      "cpuUsages" : [ 1464, 1464, 1465, 1464, 1054, 1047, 1047, 1043, 1010, 905, 843, 844 ],
+      "vmemKbytes" : [ 177532, 532598, 887664, 1242729, 1425654, 1425695, 1425696, 1425695, 1425696, 1425696, 1425695, 1425696 ],
+      "physMemKbytes" : [ 35793, 107380, 178967, 250554, 288480, 290645, 292802, 294945, 295913, 295599, 293360, 290944 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13650,
+        "virtualMemoryUsage" : 1459912704,
+        "physicalMemoryUsage" : 296689664,
+        "heapUsage" : 740425728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164134,
+    "taskID" : "task_1369942127770_1206_m_000060",
+    "taskType" : "MAP",
+    "finishTime" : 1371222225441,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222206294,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222225441,
+      "attemptID" : "attempt_1369942127770_1206_m_000060_0",
+      "clockSplits" : [ 1420, 1420, 1421, 1420, 1420, 1421, 1382, 1130, 1130, 1252, 1448, 4180 ],
+      "cpuUsages" : [ 1221, 1222, 1222, 1222, 1221, 1222, 1208, 1119, 1120, 1000, 808, 1165 ],
+      "vmemKbytes" : [ 104942, 314826, 524711, 734595, 944480, 1154364, 1362397, 1441311, 1441312, 1441312, 1441311, 1441312 ],
+      "physMemKbytes" : [ 22576, 67728, 112881, 158034, 203187, 248339, 293119, 311828, 314605, 317000, 315530, 313123 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13850,
+        "virtualMemoryUsage" : 1475903488,
+        "physicalMemoryUsage" : 319762432,
+        "heapUsage" : 742326272
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164134,
+    "taskID" : "task_1369942127770_1206_m_000061",
+    "taskType" : "MAP",
+    "finishTime" : 1371222221672,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222206296,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222221672,
+      "attemptID" : "attempt_1369942127770_1206_m_000061_0",
+      "clockSplits" : [ 1217, 1218, 1218, 1218, 1218, 1217, 1218, 1218, 1106, 972, 972, 2580 ],
+      "cpuUsages" : [ 1102, 1102, 1103, 1102, 1103, 1102, 1102, 1103, 1008, 896, 896, 1281 ],
+      "vmemKbytes" : [ 84070, 252211, 420352, 588493, 756634, 924775, 1092916, 1261057, 1411777, 1436728, 1436727, 1436728 ],
+      "physMemKbytes" : [ 16339, 49018, 81697, 114376, 147055, 179734, 212413, 245092, 274523, 280502, 281827, 283091 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12900,
+        "virtualMemoryUsage" : 1471209472,
+        "physicalMemoryUsage" : 290119680,
+        "heapUsage" : 674496512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164135,
+    "taskID" : "task_1369942127770_1206_m_000062",
+    "taskType" : "MAP",
+    "finishTime" : 1371222221958,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222206298,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222221958,
+      "attemptID" : "attempt_1369942127770_1206_m_000062_0",
+      "clockSplits" : [ 1276, 1276, 1277, 1276, 1276, 1277, 1253, 882, 881, 882, 3492, 94 ],
+      "cpuUsages" : [ 1156, 1157, 1157, 1157, 1157, 1156, 1148, 990, 990, 990, 1022, 1060 ],
+      "vmemKbytes" : [ 101522, 304566, 507610, 710654, 913699, 1116743, 1319439, 1409411, 1409412, 1409412, 1409411, 1409412 ],
+      "physMemKbytes" : [ 21852, 65556, 109261, 152965, 196670, 240375, 284000, 301612, 298461, 295309, 292461, 291917 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13490,
+        "virtualMemoryUsage" : 1443237888,
+        "physicalMemoryUsage" : 299003904,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164135,
+    "taskID" : "task_1369942127770_1206_m_000063",
+    "taskType" : "MAP",
+    "finishTime" : 1371222227163,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222207290,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222227163,
+      "attemptID" : "attempt_1369942127770_1206_m_000063_0",
+      "clockSplits" : [ 1693, 1694, 1694, 1694, 1694, 1694, 1713, 2362, 4563, 269, 269, 270 ],
+      "cpuUsages" : [ 1238, 1239, 1238, 1239, 1238, 1239, 1171, 1204, 1078, 895, 895, 896 ],
+      "vmemKbytes" : [ 117528, 352587, 587645, 822702, 1057761, 1292818, 1424850, 1425327, 1425328, 1425328, 1425327, 1425328 ],
+      "physMemKbytes" : [ 25760, 77280, 128800, 180319, 231840, 283359, 312333, 312567, 315051, 313807, 312106, 310406 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13690,
+        "virtualMemoryUsage" : 1459535872,
+        "physicalMemoryUsage" : 316899328,
+        "heapUsage" : 735051776
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164135,
+    "taskID" : "task_1369942127770_1206_m_000064",
+    "taskType" : "MAP",
+    "finishTime" : 1371222227254,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222207289,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222227254,
+      "attemptID" : "attempt_1369942127770_1206_m_000064_0",
+      "clockSplits" : [ 1705, 1705, 1705, 1705, 1705, 1702, 1632, 1534, 805, 806, 806, 3859 ],
+      "cpuUsages" : [ 1228, 1228, 1228, 1228, 1228, 1225, 1140, 1106, 851, 851, 851, 1326 ],
+      "vmemKbytes" : [ 119109, 357327, 595545, 833763, 1071982, 1310012, 1419836, 1419835, 1419836, 1419836, 1419835, 1419836 ],
+      "physMemKbytes" : [ 25719, 77160, 128601, 180042, 231483, 282884, 306601, 306586, 305168, 302849, 300530, 298267 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13590,
+        "virtualMemoryUsage" : 1453912064,
+        "physicalMemoryUsage" : 304549888,
+        "heapUsage" : 734855168
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164135,
+    "taskID" : "task_1369942127770_1206_m_000065",
+    "taskType" : "MAP",
+    "finishTime" : 1371222230890,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222207289,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222230890,
+      "attemptID" : "attempt_1369942127770_1206_m_000065_0",
+      "clockSplits" : [ 2510, 2511, 2511, 2511, 881, 855, 855, 3817, 956, 957, 957, 4275 ],
+      "cpuUsages" : [ 1419, 1420, 1419, 1420, 975, 968, 969, 1185, 898, 899, 898, 1340 ],
+      "vmemKbytes" : [ 175498, 526495, 877492, 1228489, 1409318, 1409359, 1409360, 1409359, 1409360, 1409360, 1409359, 1409360 ],
+      "physMemKbytes" : [ 37886, 113658, 189430, 265201, 304989, 306545, 308094, 310685, 313574, 311030, 308486, 306866 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13810,
+        "virtualMemoryUsage" : 1443184640,
+        "physicalMemoryUsage" : 314040320,
+        "heapUsage" : 734920704
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164136,
+    "taskID" : "task_1369942127770_1206_m_000066",
+    "taskType" : "MAP",
+    "finishTime" : 1371222241231,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222209293,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222241231,
+      "attemptID" : "attempt_1369942127770_1206_m_000066_0",
+      "clockSplits" : [ 1787, 1787, 1788, 1787, 1787, 1088, 1085, 4240, 1584, 1583, 1583, 11834 ],
+      "cpuUsages" : [ 1420, 1421, 1421, 1421, 1421, 1182, 1181, 1242, 848, 848, 848, 1147 ],
+      "vmemKbytes" : [ 141716, 425148, 708581, 992014, 1275447, 1418363, 1418476, 1418585, 1418628, 1418628, 1418627, 1418628 ],
+      "physMemKbytes" : [ 30409, 91229, 152048, 212867, 273687, 305868, 308943, 311994, 312816, 312180, 311543, 310922 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14400,
+        "virtualMemoryUsage" : 1452675072,
+        "physicalMemoryUsage" : 318169088,
+        "heapUsage" : 745537536
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164136,
+    "taskID" : "task_1369942127770_1206_m_000067",
+    "taskType" : "MAP",
+    "finishTime" : 1371222225138,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222209294,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222225138,
+      "attemptID" : "attempt_1369942127770_1206_m_000067_0",
+      "clockSplits" : [ 1165, 1166, 1165, 1166, 1166, 1165, 1166, 928, 723, 722, 722, 3621 ],
+      "cpuUsages" : [ 1214, 1215, 1215, 1215, 1215, 1215, 1215, 1030, 869, 869, 869, 1129 ],
+      "vmemKbytes" : [ 95135, 285405, 475675, 665945, 856216, 1046485, 1236756, 1399842, 1420452, 1420452, 1420451, 1420452 ],
+      "physMemKbytes" : [ 18348, 55044, 91740, 128435, 165132, 201827, 238524, 271054, 281752, 289291, 296830, 304922 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13660,
+        "virtualMemoryUsage" : 1454542848,
+        "physicalMemoryUsage" : 319750144,
+        "heapUsage" : 673841152
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164136,
+    "taskID" : "task_1369942127770_1206_m_000068",
+    "taskType" : "MAP",
+    "finishTime" : 1371222230905,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222210298,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222230905,
+      "attemptID" : "attempt_1369942127770_1206_m_000068_0",
+      "clockSplits" : [ 2408, 2408, 2408, 2409, 1930, 1718, 1379, 1310, 798, 798, 797, 2239 ],
+      "cpuUsages" : [ 1541, 1542, 1541, 1542, 1162, 1109, 1032, 997, 741, 740, 740, 1213 ],
+      "vmemKbytes" : [ 178979, 536937, 894896, 1252854, 1437270, 1437311, 1437312, 1437311, 1437312, 1437312, 1437311, 1437312 ],
+      "physMemKbytes" : [ 38258, 114775, 191292, 267809, 307294, 307439, 307617, 307800, 307382, 306576, 305769, 304983 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13900,
+        "virtualMemoryUsage" : 1471807488,
+        "physicalMemoryUsage" : 312037376,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164137,
+    "taskID" : "task_1369942127770_1206_m_000069",
+    "taskType" : "MAP",
+    "finishTime" : 1371222225328,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222210302,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222225328,
+      "attemptID" : "attempt_1369942127770_1206_m_000069_0",
+      "clockSplits" : [ 1091, 1092, 1091, 1092, 1092, 1091, 1092, 1058, 803, 804, 804, 3736 ],
+      "cpuUsages" : [ 1107, 1107, 1108, 1107, 1108, 1107, 1108, 1073, 810, 810, 810, 1305 ],
+      "vmemKbytes" : [ 89984, 269954, 449923, 629892, 809862, 989831, 1169801, 1348531, 1418636, 1418636, 1418635, 1418636 ],
+      "physMemKbytes" : [ 17538, 52614, 87690, 122765, 157842, 192917, 227994, 262894, 282408, 291993, 301578, 311953 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12740,
+        "virtualMemoryUsage" : 1452683264,
+        "physicalMemoryUsage" : 329846784,
+        "heapUsage" : 655818752
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164137,
+    "taskID" : "task_1369942127770_1206_m_000070",
+    "taskType" : "MAP",
+    "finishTime" : 1371222230923,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222210301,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222230923,
+      "attemptID" : "attempt_1369942127770_1206_m_000070_0",
+      "clockSplits" : [ 1667, 1667, 1667, 1667, 1667, 1451, 1272, 1327, 1731, 1653, 1491, 3356 ],
+      "cpuUsages" : [ 1331, 1331, 1331, 1331, 1332, 1146, 993, 987, 942, 944, 946, 1406 ],
+      "vmemKbytes" : [ 130716, 392148, 653580, 915011, 1176444, 1398858, 1425760, 1425759, 1425760, 1425760, 1425759, 1425760 ],
+      "physMemKbytes" : [ 25209, 75627, 126045, 176463, 226882, 269981, 276408, 277936, 291940, 312986, 321089, 324970 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 14020,
+        "virtualMemoryUsage" : 1459978240,
+        "physicalMemoryUsage" : 333864960,
+        "heapUsage" : 675282944
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164137,
+    "taskID" : "task_1369942127770_1206_m_000071",
+    "taskType" : "MAP",
+    "finishTime" : 1371222243147,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222210300,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222243147,
+      "attemptID" : "attempt_1369942127770_1206_m_000071_0",
+      "clockSplits" : [ 2317, 2317, 2317, 2318, 830, 804, 803, 20720, 104, 104, 104, 104 ],
+      "cpuUsages" : [ 1476, 1476, 1476, 1476, 1068, 1062, 1061, 1367, 764, 765, 764, 765 ],
+      "vmemKbytes" : [ 179124, 537372, 895621, 1253870, 1439095, 1439147, 1439148, 1439147, 1439148, 1439148, 1439147, 1439148 ],
+      "physMemKbytes" : [ 38656, 115968, 193280, 270591, 311557, 313623, 315680, 317727, 317803, 316372, 314939, 313508 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13520,
+        "virtualMemoryUsage" : 1473687552,
+        "physicalMemoryUsage" : 320299008,
+        "heapUsage" : 740425728
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164138,
+    "taskID" : "task_1369942127770_1206_m_000072",
+    "taskType" : "MAP",
+    "finishTime" : 1371222230925,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222210302,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222230925,
+      "attemptID" : "attempt_1369942127770_1206_m_000072_0",
+      "clockSplits" : [ 2052, 2053, 2052, 2053, 2052, 1753, 1343, 1286, 863, 863, 863, 3385 ],
+      "cpuUsages" : [ 1301, 1302, 1301, 1302, 1301, 1214, 1093, 1070, 887, 887, 887, 1265 ],
+      "vmemKbytes" : [ 129050, 387150, 645250, 903350, 1161451, 1396549, 1439636, 1439635, 1439636, 1439636, 1439635, 1439636 ],
+      "physMemKbytes" : [ 27936, 83809, 139683, 195556, 251430, 302570, 314193, 316918, 316967, 315288, 313608, 312145 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13810,
+        "virtualMemoryUsage" : 1474187264,
+        "physicalMemoryUsage" : 319389696,
+        "heapUsage" : 725942272
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164138,
+    "taskID" : "task_1369942127770_1206_m_000073",
+    "taskType" : "MAP",
+    "finishTime" : 1371222233643,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222211323,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222233643,
+      "attemptID" : "attempt_1369942127770_1206_m_000073_0",
+      "clockSplits" : [ 2850, 2850, 2851, 2850, 3634, 922, 921, 915, 864, 864, 863, 1931 ],
+      "cpuUsages" : [ 1422, 1422, 1422, 1422, 1195, 974, 974, 956, 814, 813, 814, 1162 ],
+      "vmemKbytes" : [ 178725, 536177, 893628, 1251079, 1430284, 1428495, 1428496, 1428495, 1428496, 1428496, 1428495, 1428496 ],
+      "physMemKbytes" : [ 33814, 101442, 169070, 236698, 286736, 296978, 302601, 308176, 309819, 308938, 308057, 307285 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13390,
+        "virtualMemoryUsage" : 1462779904,
+        "physicalMemoryUsage" : 314519552,
+        "heapUsage" : 656801792
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164138,
+    "taskID" : "task_1369942127770_1206_m_000074",
+    "taskType" : "MAP",
+    "finishTime" : 1371222231021,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222211318,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222231021,
+      "attemptID" : "attempt_1369942127770_1206_m_000074_0",
+      "clockSplits" : [ 2026, 2027, 2026, 2027, 1805, 998, 998, 1150, 2266, 1405, 1124, 1124 ],
+      "cpuUsages" : [ 1354, 1354, 1355, 1354, 1264, 933, 933, 931, 908, 776, 734, 734 ],
+      "vmemKbytes" : [ 148613, 445839, 743066, 1040292, 1330604, 1422019, 1422020, 1422019, 1422020, 1422020, 1422019, 1422020 ],
+      "physMemKbytes" : [ 32329, 96989, 161649, 226308, 289469, 309488, 309679, 309869, 309968, 309242, 306663, 304002 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13210,
+        "virtualMemoryUsage" : 1456148480,
+        "physicalMemoryUsage" : 313556992,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164139,
+    "taskID" : "task_1369942127770_1206_m_000075",
+    "taskType" : "MAP",
+    "finishTime" : 1371222230806,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222211320,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222230806,
+      "attemptID" : "attempt_1369942127770_1206_m_000075_0",
+      "clockSplits" : [ 1609, 1609, 1610, 1609, 1609, 1610, 1609, 1437, 800, 800, 800, 3712 ],
+      "cpuUsages" : [ 1126, 1126, 1126, 1126, 1127, 1126, 1126, 1078, 896, 897, 896, 1050 ],
+      "vmemKbytes" : [ 91606, 274818, 458031, 641244, 824457, 1007670, 1190883, 1369937, 1426664, 1426664, 1426663, 1426664 ],
+      "physMemKbytes" : [ 18989, 56967, 94945, 132922, 170901, 208878, 246857, 284002, 296666, 297978, 299289, 300540 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13070,
+        "virtualMemoryUsage" : 1460903936,
+        "physicalMemoryUsage" : 308080640,
+        "heapUsage" : 728367104
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164139,
+    "taskID" : "task_1369942127770_1206_m_000076",
+    "taskType" : "MAP",
+    "finishTime" : 1371222231013,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222211322,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222231013,
+      "attemptID" : "attempt_1369942127770_1206_m_000076_0",
+      "clockSplits" : [ 1510, 1510, 1510, 1510, 1511, 1510, 1543, 3155, 989, 989, 3170, 779 ],
+      "cpuUsages" : [ 1182, 1183, 1183, 1183, 1183, 1183, 1182, 1138, 1003, 1002, 1004, 1174 ],
+      "vmemKbytes" : [ 103292, 309877, 516463, 723048, 929633, 1136218, 1342774, 1442573, 1441656, 1440154, 1438651, 1437908 ],
+      "physMemKbytes" : [ 22609, 67829, 113048, 158267, 203487, 248706, 293920, 315760, 313552, 309910, 306268, 304426 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13600,
+        "virtualMemoryUsage" : 1472417792,
+        "physicalMemoryUsage" : 311689216,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164139,
+    "taskID" : "task_1369942127770_1206_m_000077",
+    "taskType" : "MAP",
+    "finishTime" : 1371222230986,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222211321,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222230986,
+      "attemptID" : "attempt_1369942127770_1206_m_000077_0",
+      "clockSplits" : [ 2453, 2454, 2454, 2454, 983, 819, 818, 834, 953, 953, 952, 3225 ],
+      "cpuUsages" : [ 1358, 1358, 1358, 1358, 1081, 1050, 1050, 1036, 929, 930, 930, 882 ],
+      "vmemKbytes" : [ 173221, 519663, 866105, 1212547, 1419007, 1420775, 1420776, 1420775, 1420776, 1420776, 1420775, 1420776 ],
+      "physMemKbytes" : [ 37672, 113016, 188361, 263705, 309197, 311033, 312493, 313926, 312972, 310477, 307981, 306375 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13630,
+        "virtualMemoryUsage" : 1454874624,
+        "physicalMemoryUsage" : 313704448,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164139,
+    "taskID" : "task_1369942127770_1206_m_000078",
+    "taskType" : "MAP",
+    "finishTime" : 1371222230909,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222211322,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222230909,
+      "attemptID" : "attempt_1369942127770_1206_m_000078_0",
+      "clockSplits" : [ 1544, 1545, 1545, 1545, 1545, 1544, 1888, 2074, 1066, 1066, 3565, 400 ],
+      "cpuUsages" : [ 1237, 1237, 1238, 1237, 1237, 1238, 1206, 1153, 966, 966, 971, 994 ],
+      "vmemKbytes" : [ 109547, 328642, 547738, 766833, 985929, 1205024, 1394686, 1420099, 1420100, 1420100, 1420099, 1420100 ],
+      "physMemKbytes" : [ 23842, 71526, 119211, 166896, 214581, 262265, 303541, 309043, 308442, 307473, 306523, 306207 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13790,
+        "virtualMemoryUsage" : 1454182400,
+        "physicalMemoryUsage" : 313499648,
+        "heapUsage" : 734789632
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164140,
+    "taskID" : "task_1369942127770_1206_m_000079",
+    "taskType" : "MAP",
+    "finishTime" : 1371222241634,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222212318,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222241634,
+      "attemptID" : "attempt_1369942127770_1206_m_000079_0",
+      "clockSplits" : [ 1728, 1728, 1728, 1728, 1729, 1728, 1984, 16602, 89, 88, 89, 89 ],
+      "cpuUsages" : [ 1174, 1174, 1175, 1174, 1175, 1174, 1167, 1241, 766, 767, 766, 767 ],
+      "vmemKbytes" : [ 109233, 327701, 546169, 764636, 983104, 1201571, 1396830, 1428571, 1428572, 1428572, 1428571, 1428572 ],
+      "physMemKbytes" : [ 23542, 70627, 117712, 164797, 211882, 258967, 301447, 311452, 311774, 309734, 307693, 305652 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12520,
+        "virtualMemoryUsage" : 1462857728,
+        "physicalMemoryUsage" : 311943168,
+        "heapUsage" : 723714048
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164140,
+    "taskID" : "task_1369942127770_1206_m_000080",
+    "taskType" : "MAP",
+    "finishTime" : 1371222234375,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222212320,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222234375,
+      "attemptID" : "attempt_1369942127770_1206_m_000080_0",
+      "clockSplits" : [ 2667, 2668, 2668, 2668, 1137, 1111, 1291, 2903, 866, 867, 866, 2337 ],
+      "cpuUsages" : [ 1361, 1362, 1361, 1362, 1011, 1005, 1020, 1148, 925, 926, 925, 1094 ],
+      "vmemKbytes" : [ 179085, 537255, 895425, 1253594, 1438779, 1438831, 1438832, 1438831, 1438832, 1438832, 1438831, 1438832 ],
+      "physMemKbytes" : [ 38347, 115043, 191739, 268434, 308300, 308750, 309191, 309763, 309488, 308604, 307719, 306908 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13500,
+        "virtualMemoryUsage" : 1473363968,
+        "physicalMemoryUsage" : 314023936,
+        "heapUsage" : 723714048
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164140,
+    "taskID" : "task_1369942127770_1206_m_000081",
+    "taskType" : "MAP",
+    "finishTime" : 1371222233436,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222212365,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222233436,
+      "attemptID" : "attempt_1369942127770_1206_m_000081_0",
+      "clockSplits" : [ 2872, 2872, 2872, 2872, 1498, 1478, 1590, 1608, 2713, 183, 183, 184 ],
+      "cpuUsages" : [ 1372, 1372, 1372, 1373, 1091, 1087, 955, 934, 919, 918, 918, 919 ],
+      "vmemKbytes" : [ 177378, 532136, 886894, 1241651, 1424418, 1424459, 1424460, 1424459, 1424460, 1424460, 1424459, 1424460 ],
+      "physMemKbytes" : [ 36488, 109466, 182444, 255421, 293123, 293347, 293592, 293884, 293699, 292787, 291867, 290948 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13300,
+        "virtualMemoryUsage" : 1458647040,
+        "physicalMemoryUsage" : 297373696,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164141,
+    "taskID" : "task_1369942127770_1206_m_000082",
+    "taskType" : "MAP",
+    "finishTime" : 1371222234234,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222212323,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222234234,
+      "attemptID" : "attempt_1369942127770_1206_m_000082_0",
+      "clockSplits" : [ 2757, 2758, 2757, 2758, 2290, 984, 985, 1009, 1193, 1192, 2624, 600 ],
+      "cpuUsages" : [ 1283, 1284, 1284, 1283, 1212, 1011, 1012, 1009, 997, 997, 992, 986 ],
+      "vmemKbytes" : [ 150595, 451787, 752979, 1054170, 1344891, 1426535, 1426536, 1426535, 1426536, 1426536, 1426535, 1426536 ],
+      "physMemKbytes" : [ 30285, 90858, 151430, 212001, 270566, 289039, 291857, 294632, 293797, 290645, 287899, 287491 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13350,
+        "virtualMemoryUsage" : 1460772864,
+        "physicalMemoryUsage" : 294371328,
+        "heapUsage" : 723714048
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164141,
+    "taskID" : "task_1369942127770_1206_m_000083",
+    "taskType" : "MAP",
+    "finishTime" : 1371222234374,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222212325,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222234374,
+      "attemptID" : "attempt_1369942127770_1206_m_000083_0",
+      "clockSplits" : [ 2632, 2633, 2633, 2632, 2063, 1726, 1324, 1287, 1007, 1006, 1668, 1433 ],
+      "cpuUsages" : [ 1382, 1382, 1382, 1382, 1210, 1095, 961, 964, 990, 990, 989, 963 ],
+      "vmemKbytes" : [ 179482, 538446, 897411, 1256376, 1441309, 1441351, 1441352, 1441351, 1441352, 1441352, 1441351, 1441352 ],
+      "physMemKbytes" : [ 38229, 114688, 191148, 267607, 307615, 309001, 311141, 313407, 313352, 311808, 310265, 309532 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13690,
+        "virtualMemoryUsage" : 1475944448,
+        "physicalMemoryUsage" : 316928000,
+        "heapUsage" : 744685568
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164141,
+    "taskID" : "task_1369942127770_1206_m_000084",
+    "taskType" : "MAP",
+    "finishTime" : 1371222233257,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222212365,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222233257,
+      "attemptID" : "attempt_1369942127770_1206_m_000084_0",
+      "clockSplits" : [ 3170, 3170, 3170, 3170, 841, 800, 800, 873, 1410, 1411, 1720, 353 ],
+      "cpuUsages" : [ 1398, 1399, 1399, 1399, 938, 929, 929, 934, 971, 970, 919, 915 ],
+      "vmemKbytes" : [ 176295, 528885, 881475, 1234064, 1416363, 1416415, 1416416, 1416415, 1416416, 1416416, 1416415, 1416416 ],
+      "physMemKbytes" : [ 35965, 107895, 179825, 251754, 289004, 289138, 289261, 289383, 289436, 289443, 288025, 284629 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13100,
+        "virtualMemoryUsage" : 1450409984,
+        "physicalMemoryUsage" : 289714176,
+        "heapUsage" : 723582976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164142,
+    "taskID" : "task_1369942127770_1206_m_000085",
+    "taskType" : "MAP",
+    "finishTime" : 1371222240854,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222212327,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222240854,
+      "attemptID" : "attempt_1369942127770_1206_m_000085_0",
+      "clockSplits" : [ 2049, 2050, 2049, 2050, 2046, 1082, 1082, 15663, 112, 113, 113, 113 ],
+      "cpuUsages" : [ 1282, 1283, 1283, 1283, 1282, 865, 866, 1015, 778, 777, 778, 778 ],
+      "vmemKbytes" : [ 143872, 431618, 719364, 1007109, 1294853, 1437631, 1437632, 1437631, 1437632, 1437632, 1437631, 1437632 ],
+      "physMemKbytes" : [ 31953, 95859, 159765, 223671, 287577, 319740, 320639, 321522, 320713, 318771, 316828, 314887 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12270,
+        "virtualMemoryUsage" : 1472135168,
+        "physicalMemoryUsage" : 321449984,
+        "heapUsage" : 656867328
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164142,
+    "taskID" : "task_1369942127770_1206_m_000086",
+    "taskType" : "MAP",
+    "finishTime" : 1371222230895,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222212325,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222230895,
+      "attemptID" : "attempt_1369942127770_1206_m_000086_0",
+      "clockSplits" : [ 1916, 1917, 1917, 1917, 1917, 1310, 628, 629, 629, 628, 1548, 3609 ],
+      "cpuUsages" : [ 1298, 1299, 1299, 1298, 1299, 1114, 906, 906, 907, 906, 944, 1414 ],
+      "vmemKbytes" : [ 129021, 387064, 645107, 903150, 1161194, 1390573, 1426632, 1426631, 1426632, 1426632, 1426631, 1426632 ],
+      "physMemKbytes" : [ 27206, 81618, 136031, 190443, 244856, 293234, 300915, 301006, 301097, 301188, 300855, 298031 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13590,
+        "virtualMemoryUsage" : 1460871168,
+        "physicalMemoryUsage" : 304197632,
+        "heapUsage" : 738656256
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164142,
+    "taskID" : "task_1369942127770_1206_m_000087",
+    "taskType" : "MAP",
+    "finishTime" : 1371222243205,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222212324,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222243205,
+      "attemptID" : "attempt_1369942127770_1206_m_000087_0",
+      "clockSplits" : [ 2494, 2494, 2494, 2494, 1979, 18502, 69, 70, 70, 70, 70, 70 ],
+      "cpuUsages" : [ 1501, 1501, 1501, 1501, 1135, 1230, 804, 803, 803, 804, 803, 804 ],
+      "vmemKbytes" : [ 178670, 536012, 893354, 1250695, 1435451, 1432834, 1425524, 1425523, 1425524, 1425524, 1425523, 1425524 ],
+      "physMemKbytes" : [ 38239, 114717, 191196, 267674, 307284, 303356, 292389, 292664, 292939, 293215, 293490, 293766 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13190,
+        "virtualMemoryUsage" : 1459736576,
+        "physicalMemoryUsage" : 300957696,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164142,
+    "taskID" : "task_1369942127770_1206_m_000088",
+    "taskType" : "MAP",
+    "finishTime" : 1371222232772,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222212326,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222232772,
+      "attemptID" : "attempt_1369942127770_1206_m_000088_0",
+      "clockSplits" : [ 2652, 2652, 2653, 2652, 1643, 1624, 1581, 4351, 35, 35, 35, 35 ],
+      "cpuUsages" : [ 1349, 1350, 1350, 1350, 1074, 1054, 836, 832, 804, 803, 804, 804 ],
+      "vmemKbytes" : [ 177435, 532306, 887178, 1242049, 1424874, 1424915, 1424916, 1424915, 1424916, 1424916, 1424915, 1424916 ],
+      "physMemKbytes" : [ 36160, 108480, 180800, 253120, 290481, 290705, 291974, 294028, 293783, 292064, 290343, 288624 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 12710,
+        "virtualMemoryUsage" : 1459113984,
+        "physicalMemoryUsage" : 294797312,
+        "heapUsage" : 723648512
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164143,
+    "taskID" : "task_1369942127770_1206_m_000089",
+    "taskType" : "MAP",
+    "finishTime" : 1371222232612,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2117.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2117.halxg.cloudera.com",
+      "startTime" : 1371222213322,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222232612,
+      "attemptID" : "attempt_1369942127770_1206_m_000089_0",
+      "clockSplits" : [ 2150, 2150, 2150, 2150, 2150, 1793, 1344, 1294, 925, 926, 926, 1328 ],
+      "cpuUsages" : [ 1229, 1229, 1229, 1229, 1229, 1163, 1080, 1055, 866, 865, 866, 1240 ],
+      "vmemKbytes" : [ 129366, 388101, 646836, 905570, 1164305, 1397662, 1437812, 1437790, 1435927, 1432883, 1429838, 1427696 ],
+      "physMemKbytes" : [ 27669, 83009, 138349, 193688, 249028, 299294, 310933, 314481, 312611, 307268, 301925, 298134 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 13280,
+        "virtualMemoryUsage" : 1461878784,
+        "physicalMemoryUsage" : 305094656,
+        "heapUsage" : 740360192
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164143,
+    "taskID" : "task_1369942127770_1206_m_000090",
+    "taskType" : "MAP",
+    "finishTime" : 1371222235284,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222223387,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222235284,
+      "attemptID" : "attempt_1369942127770_1206_m_000090_0",
+      "clockSplits" : [ 1105, 1106, 1106, 1106, 1105, 1106, 1106, 3584, 142, 142, 142, 143 ],
+      "cpuUsages" : [ 1039, 1040, 1040, 1039, 1040, 1040, 1039, 1034, 799, 800, 800, 800 ],
+      "vmemKbytes" : [ 89336, 268010, 446684, 625357, 804032, 982705, 1161380, 1339992, 1424680, 1424680, 1424679, 1424680 ],
+      "physMemKbytes" : [ 18972, 56916, 94861, 132805, 170750, 208694, 246639, 284573, 305523, 311161, 316798, 322437 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11510,
+        "virtualMemoryUsage" : 1458872320,
+        "physicalMemoryUsage" : 333062144,
+        "heapUsage" : 662962176
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164143,
+    "taskID" : "task_1369942127770_1206_m_000091",
+    "taskType" : "MAP",
+    "finishTime" : 1371222237538,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2115.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2115.halxg.cloudera.com",
+      "startTime" : 1371222223387,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222237538,
+      "attemptID" : "attempt_1369942127770_1206_m_000091_0",
+      "clockSplits" : [ 1479, 1479, 1479, 1479, 1479, 1479, 1300, 625, 625, 625, 625, 1471 ],
+      "cpuUsages" : [ 955, 956, 956, 955, 956, 956, 901, 694, 694, 694, 694, 1249 ],
+      "vmemKbytes" : [ 104472, 313416, 522360, 731303, 940248, 1149191, 1353575, 1418951, 1418952, 1418952, 1418951, 1418952 ],
+      "physMemKbytes" : [ 22666, 67999, 113332, 158665, 203998, 249331, 293651, 307068, 305951, 304834, 303716, 302630 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 10660,
+        "virtualMemoryUsage" : 1453006848,
+        "physicalMemoryUsage" : 309538816,
+        "heapUsage" : 723517440
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164144,
+    "taskID" : "task_1369942127770_1206_m_000092",
+    "taskType" : "MAP",
+    "finishTime" : 1371222239274,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222225390,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222239274,
+      "attemptID" : "attempt_1369942127770_1206_m_000092_0",
+      "clockSplits" : [ 1029, 1029, 1030, 1029, 1030, 1029, 1030, 1029, 1030, 2434, 717, 718 ],
+      "cpuUsages" : [ 945, 945, 945, 945, 945, 945, 945, 945, 945, 895, 730, 730 ],
+      "vmemKbytes" : [ 72549, 217647, 362746, 507844, 652943, 798041, 943140, 1088238, 1233337, 1374501, 1417191, 1417192 ],
+      "physMemKbytes" : [ 14112, 42336, 70560, 98783, 127008, 155231, 183456, 211680, 239905, 267439, 277716, 280513 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11280,
+        "virtualMemoryUsage" : 1451204608,
+        "physicalMemoryUsage" : 288616448,
+        "heapUsage" : 674430976
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  }, {
+    "startTime" : 1371222164144,
+    "taskID" : "task_1369942127770_1206_m_000093",
+    "taskType" : "MAP",
+    "finishTime" : 1371222249913,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2116.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2116.halxg.cloudera.com",
+      "startTime" : 1371222226395,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222249913,
+      "attemptID" : "attempt_1369942127770_1206_m_000093_0",
+      "clockSplits" : [ 1998, 1998, 1998, 1999, 1998, 1998, 1999, 1998, 1998, 1998, 1999, 1533 ],
+      "cpuUsages" : [ 852, 852, 853, 852, 853, 852, 853, 852, 852, 853, 852, 1494 ],
+      "vmemKbytes" : [ 62260, 186780, 311301, 435821, 560342, 684863, 809384, 933904, 1058425, 1182946, 1307467, 1419006 ],
+      "physMemKbytes" : [ 12360, 37081, 61802, 86523, 111244, 135965, 160686, 185407, 210128, 234849, 259570, 281661 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 10870,
+        "virtualMemoryUsage" : 1471885312,
+        "physicalMemoryUsage" : 291975168,
+        "heapUsage" : 674562048
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164144,
+    "taskID" : "task_1369942127770_1206_m_000094",
+    "taskType" : "MAP",
+    "finishTime" : 1371222241825,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222227397,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222241825,
+      "attemptID" : "attempt_1369942127770_1206_m_000094_0",
+      "clockSplits" : [ 1436, 1437, 1437, 1437, 1437, 1436, 1437, 3845, 130, 129, 129, 130 ],
+      "cpuUsages" : [ 1038, 1039, 1039, 1039, 1039, 1039, 1039, 1031, 891, 892, 892, 892 ],
+      "vmemKbytes" : [ 90707, 272123, 453538, 634953, 816370, 997785, 1179201, 1360296, 1440536, 1440536, 1440535, 1440536 ],
+      "physMemKbytes" : [ 19774, 59323, 98872, 138421, 177970, 217519, 257068, 296545, 313357, 312135, 310912, 309691 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666700,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166667,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166667,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11870,
+        "virtualMemoryUsage" : 1475108864,
+        "physicalMemoryUsage" : 316497920,
+        "heapUsage" : 723451904
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166667,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166667
+  }, {
+    "startTime" : 1371222164145,
+    "taskID" : "task_1369942127770_1206_m_000095",
+    "taskType" : "MAP",
+    "finishTime" : 1371222241726,
+    "attempts" : [ {
+      "location" : {
+        "layers" : [ "default-rack", "a2118.halxg.cloudera.com" ]
+      },
+      "hostName" : "/default-rack/a2118.halxg.cloudera.com",
+      "startTime" : 1371222228399,
+      "result" : "SUCCESS",
+      "finishTime" : 1371222241726,
+      "attemptID" : "attempt_1369942127770_1206_m_000095_0",
+      "clockSplits" : [ 1288, 1289, 1289, 1289, 1288, 1289, 1289, 1289, 2675, 112, 112, 112 ],
+      "cpuUsages" : [ 992, 993, 993, 992, 993, 993, 992, 993, 853, 832, 832, 832 ],
+      "vmemKbytes" : [ 88547, 265642, 442738, 619833, 796929, 974024, 1151119, 1328214, 1437170, 1435904, 1433127, 1430352 ],
+      "physMemKbytes" : [ 19692, 59077, 98462, 137847, 177232, 216617, 256003, 295388, 318265, 314440, 310247, 306056 ],
+      "shuffleFinished" : -1,
+      "sortFinished" : -1,
+      "hdfsBytesRead" : 86,
+      "hdfsBytesWritten" : 416666600,
+      "fileBytesRead" : 0,
+      "fileBytesWritten" : 72236,
+      "mapInputRecords" : 4166666,
+      "mapOutputBytes" : -1,
+      "mapOutputRecords" : 4166666,
+      "combineInputRecords" : -1,
+      "reduceInputGroups" : -1,
+      "reduceInputRecords" : -1,
+      "reduceShuffleBytes" : -1,
+      "reduceOutputRecords" : -1,
+      "spilledRecords" : 0,
+      "mapInputBytes" : -1,
+      "resourceUsageMetrics" : {
+        "cumulativeCpuUsage" : 11290,
+        "virtualMemoryUsage" : 1463259136,
+        "physicalMemoryUsage" : 311255040,
+        "heapUsage" : 740229120
+      }
+    } ],
+    "preferredLocations" : [ ],
+    "taskStatus" : "SUCCESS",
+    "inputBytes" : 86,
+    "inputRecords" : 4166666,
+    "outputBytes" : 72236,
+    "outputRecords" : 4166666
+  } ],
+  "reduceTasks" : [ ],
+  "launchTime" : 1371222164048,
+  "totalMaps" : 96,
+  "totalReduces" : 0,
+  "otherTasks" : [ ],
+  "jobProperties" : {
+    "mapreduce.job.ubertask.enable" : "false",
+    "yarn.resourcemanager.max-completed-applications" : "10000",
+    "yarn.resourcemanager.delayed.delegation-token.removal-interval-ms" : "30000",
+    "mapreduce.client.submit.file.replication" : "2",
+    "yarn.nodemanager.container-manager.thread-count" : "20",
+    "mapred.queue.default.acl-administer-jobs" : "*",
+    "dfs.image.transfer.bandwidthPerSec" : "0",
+    "mapreduce.tasktracker.healthchecker.interval" : "60000",
+    "mapreduce.jobtracker.staging.root.dir" : "/user",
+    "yarn.resourcemanager.recovery.enabled" : "false",
+    "yarn.resourcemanager.am.max-retries" : "1",
+    "dfs.block.access.token.lifetime" : "600",
+    "fs.AbstractFileSystem.file.impl" : "org.apache.hadoop.fs.local.LocalFs",
+    "mapreduce.client.completion.pollinterval" : "5000",
+    "mapreduce.job.ubertask.maxreduces" : "1",
+    "mapreduce.reduce.shuffle.memory.limit.percent" : "0.25",
+    "dfs.domain.socket.path" : "/var/run/hdfs-sockets/dn",
+    "hadoop.ssl.keystores.factory.class" : "org.apache.hadoop.security.ssl.FileBasedKeyStoresFactory",
+    "hadoop.http.authentication.kerberos.keytab" : "${user.home}/hadoop.keytab",
+    "yarn.nodemanager.keytab" : "/etc/krb5.keytab",
+    "io.seqfile.sorter.recordlimit" : "1000000",
+    "s3.blocksize" : "67108864",
+    "mapreduce.task.io.sort.factor" : "10",
+    "yarn.nodemanager.disk-health-checker.interval-ms" : "120000",
+    "mapreduce.job.working.dir" : "hdfs://a2115.halxg.cloudera.com:8020/user/jenkins",
+    "yarn.admin.acl" : "*",
+    "mapreduce.job.speculative.speculativecap" : "0.1",
+    "dfs.namenode.num.checkpoints.retained" : "2",
+    "dfs.namenode.delegation.token.renew-interval" : "86400000",
+    "yarn.nodemanager.resource.memory-mb" : "8192",
+    "io.map.index.interval" : "128",
+    "s3.client-write-packet-size" : "65536",
+    "mapreduce.task.files.preserve.failedtasks" : "false",
+    "dfs.namenode.http-address" : "a2115.halxg.cloudera.com:20101",
+    "ha.zookeeper.session-timeout.ms" : "5000",
+    "hadoop.hdfs.configuration.version" : "1",
+    "s3.replication" : "3",
+    "dfs.datanode.balance.bandwidthPerSec" : "1048576",
+    "mapreduce.reduce.shuffle.connect.timeout" : "180000",
+    "hadoop.ssl.enabled" : "false",
+    "dfs.journalnode.rpc-address" : "0.0.0.0:8485",
+    "yarn.nodemanager.aux-services" : "mapreduce.shuffle",
+    "mapreduce.job.counters.max" : "120",
+    "dfs.datanode.readahead.bytes" : "4193404",
+    "ipc.client.connect.max.retries.on.timeouts" : "45",
+    "mapreduce.job.complete.cancel.delegation.tokens" : "true",
+    "dfs.client.failover.max.attempts" : "15",
+    "dfs.namenode.checkpoint.dir" : "file://${hadoop.tmp.dir}/dfs/namesecondary",
+    "dfs.namenode.replication.work.multiplier.per.iteration" : "2",
+    "fs.trash.interval" : "1",
+    "yarn.resourcemanager.admin.address" : "a2115.halxg.cloudera.com:8033",
+    "ha.health-monitor.check-interval.ms" : "1000",
+    "mapreduce.job.outputformat.class" : "org.apache.hadoop.examples.terasort.TeraOutputFormat",
+    "hadoop.jetty.logs.serve.aliases" : "true",
+    "hadoop.http.authentication.kerberos.principal" : "HTTP/_HOST@LOCALHOST",
+    "mapreduce.tasktracker.taskmemorymanager.monitoringinterval" : "5000",
+    "mapreduce.job.reduce.shuffle.consumer.plugin.class" : "org.apache.hadoop.mapreduce.task.reduce.Shuffle",
+    "s3native.blocksize" : "67108864",
+    "dfs.namenode.edits.dir" : "${dfs.namenode.name.dir}",
+    "ha.health-monitor.sleep-after-disconnect.ms" : "1000",
+    "dfs.encrypt.data.transfer" : "false",
+    "dfs.datanode.http.address" : "0.0.0.0:50075",
+    "mapreduce.terasort.num-rows" : "400000000",
+    "mapreduce.job.map.class" : "org.apache.hadoop.examples.terasort.TeraGen$SortGenMapper",
+    "mapreduce.jobtracker.jobhistory.task.numberprogresssplits" : "12",
+    "dfs.namenode.write.stale.datanode.ratio" : "0.5f",
+    "dfs.client.use.datanode.hostname" : "false",
+    "yarn.acl.enable" : "true",
+    "hadoop.security.instrumentation.requires.admin" : "false",
+    "yarn.nodemanager.localizer.fetch.thread-count" : "4",
+    "hadoop.security.authorization" : "false",
+    "user.name" : "jenkins",
+    "dfs.namenode.fs-limits.min-block-size" : "1048576",
+    "dfs.client.failover.connection.retries.on.timeouts" : "0",
+    "hadoop.security.group.mapping.ldap.search.filter.group" : "(objectClass=group)",
+    "mapreduce.output.fileoutputformat.compress.codec" : "org.apache.hadoop.io.compress.DefaultCodec",
+    "dfs.namenode.safemode.extension" : "30000",
+    "mapreduce.shuffle.port" : "8080",
+    "mapreduce.reduce.log.level" : "INFO",
+    "yarn.log-aggregation-enable" : "false",
+    "dfs.datanode.sync.behind.writes" : "false",
+    "mapreduce.jobtracker.instrumentation" : "org.apache.hadoop.mapred.JobTrackerMetricsInst",
+    "dfs.https.server.keystore.resource" : "ssl-server.xml",
+    "hadoop.security.group.mapping.ldap.search.attr.group.name" : "cn",
+    "dfs.namenode.replication.min" : "1",
+    "mapreduce.map.java.opts" : " -Xmx825955249",
+    "yarn.scheduler.fair.allocation.file" : "/etc/yarn/fair-scheduler.xml",
+    "s3native.bytes-per-checksum" : "512",
+    "mapreduce.tasktracker.tasks.sleeptimebeforesigkill" : "5000",
+    "tfile.fs.output.buffer.size" : "262144",
+    "yarn.nodemanager.local-dirs" : "${hadoop.tmp.dir}/nm-local-dir",
+    "mapreduce.jobtracker.persist.jobstatus.active" : "false",
+    "fs.AbstractFileSystem.hdfs.impl" : "org.apache.hadoop.fs.Hdfs",
+    "mapreduce.job.map.output.collector.class" : "org.apache.hadoop.mapred.MapTask$MapOutputBuffer",
+    "mapreduce.tasktracker.local.dir.minspacestart" : "0",
+    "dfs.namenode.safemode.min.datanodes" : "0",
+    "hadoop.security.uid.cache.secs" : "14400",
+    "dfs.client.https.need-auth" : "false",
+    "dfs.client.write.exclude.nodes.cache.expiry.interval.millis" : "600000",
+    "dfs.client.https.keystore.resource" : "ssl-client.xml",
+    "dfs.namenode.max.objects" : "0",
+    "hadoop.ssl.client.conf" : "ssl-client.xml",
+    "dfs.namenode.safemode.threshold-pct" : "0.999f",
+    "mapreduce.tasktracker.local.dir.minspacekill" : "0",
+    "mapreduce.jobtracker.retiredjobs.cache.size" : "1000",
+    "dfs.blocksize" : "134217728",
+    "yarn.resourcemanager.scheduler.class" : "org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler",
+    "mapreduce.job.reduce.slowstart.completedmaps" : "0.8",
+    "mapreduce.job.end-notification.retry.attempts" : "5",
+    "mapreduce.job.inputformat.class" : "org.apache.hadoop.examples.terasort.TeraGen$RangeInputFormat",
+    "mapreduce.map.memory.mb" : "1024",
+    "mapreduce.job.user.name" : "jenkins",
+    "mapreduce.tasktracker.outofband.heartbeat" : "false",
+    "io.native.lib.available" : "true",
+    "mapreduce.jobtracker.persist.jobstatus.hours" : "0",
+    "dfs.client-write-packet-size" : "65536",
+    "mapreduce.client.progressmonitor.pollinterval" : "1000",
+    "dfs.namenode.name.dir" : "file://${hadoop.tmp.dir}/dfs/name",
+    "dfs.ha.log-roll.period" : "120",
+    "mapreduce.reduce.input.buffer.percent" : "0.0",
+    "mapreduce.map.output.compress.codec" : "org.apache.hadoop.io.compress.SnappyCodec",
+    "mapreduce.map.skip.proc.count.autoincr" : "true",
+    "dfs.client.failover.sleep.base.millis" : "500",
+    "dfs.datanode.directoryscan.threads" : "1",
+    "mapreduce.jobtracker.address" : "neededForHive:999999",
+    "mapreduce.cluster.local.dir" : "${hadoop.tmp.dir}/mapred/local",
+    "yarn.scheduler.fair.user-as-default-queue" : "true",
+    "mapreduce.job.application.attempt.id" : "1",
+    "dfs.permissions.enabled" : "true",
+    "mapreduce.tasktracker.taskcontroller" : "org.apache.hadoop.mapred.DefaultTaskController",
+    "yarn.scheduler.fair.preemption" : "true",
+    "mapreduce.reduce.shuffle.parallelcopies" : "5",
+    "dfs.support.append" : "true",
+    "yarn.nodemanager.env-whitelist" : "JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,YARN_HOME",
+    "mapreduce.jobtracker.heartbeats.in.second" : "100",
+    "mapreduce.job.maxtaskfailures.per.tracker" : "3",
+    "ipc.client.connection.maxidletime" : "10000",
+    "mapreduce.shuffle.ssl.enabled" : "false",
+    "dfs.namenode.invalidate.work.pct.per.iteration" : "0.32f",
+    "dfs.blockreport.intervalMsec" : "21600000",
+    "fs.s3.sleepTimeSeconds" : "10",
+    "dfs.namenode.replication.considerLoad" : "true",
+    "dfs.client.block.write.retries" : "3",
+    "hadoop.ssl.server.conf" : "ssl-server.xml",
+    "dfs.namenode.name.dir.restore" : "false",
+    "rpc.engine.org.apache.hadoop.mapreduce.v2.api.MRClientProtocolPB" : "org.apache.hadoop.ipc.ProtobufRpcEngine",
+    "dfs.datanode.hdfs-blocks-metadata.enabled" : "true",
+    "ha.zookeeper.parent-znode" : "/hadoop-ha",
+    "io.seqfile.lazydecompress" : "true",
+    "dfs.https.enable" : "false",
+    "mapreduce.reduce.merge.inmem.threshold" : "1000",
+    "mapreduce.input.fileinputformat.split.minsize" : "0",
+    "dfs.replication" : "3",
+    "ipc.client.tcpnodelay" : "false",
+    "dfs.namenode.accesstime.precision" : "3600000",
+    "s3.stream-buffer-size" : "4096",
+    "mapreduce.jobtracker.tasktracker.maxblacklists" : "4",
+    "dfs.client.read.shortcircuit.skip.checksum" : "false",
+    "mapreduce.job.jvm.numtasks" : "1",
+    "mapreduce.task.io.sort.mb" : "100",
+    "io.file.buffer.size" : "65536",
+    "dfs.namenode.audit.loggers" : "default",
+    "dfs.namenode.checkpoint.txns" : "1000000",
+    "yarn.nodemanager.admin-env" : "MALLOC_ARENA_MAX=$MALLOC_ARENA_MAX",
+    "mapreduce.job.jar" : "/user/jenkins/.staging/job_1369942127770_1206/job.jar",
+    "mapreduce.job.split.metainfo.maxsize" : "10000000",
+    "kfs.replication" : "3",
+    "rpc.engine.org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB" : "org.apache.hadoop.ipc.ProtobufRpcEngine",
+    "yarn.app.mapreduce.am.scheduler.heartbeat.interval-ms" : "1000",
+    "mapreduce.reduce.maxattempts" : "4",
+    "kfs.stream-buffer-size" : "4096",
+    "dfs.ha.tail-edits.period" : "60",
+    "hadoop.security.authentication" : "simple",
+    "fs.s3.buffer.dir" : "${hadoop.tmp.dir}/s3",
+    "rpc.engine.org.apache.hadoop.yarn.api.AMRMProtocolPB" : "org.apache.hadoop.ipc.ProtobufRpcEngine",
+    "mapreduce.jobtracker.taskscheduler" : "org.apache.hadoop.mapred.JobQueueTaskScheduler",
+    "yarn.app.mapreduce.am.job.task.listener.thread-count" : "30",
+    "dfs.namenode.avoid.read.stale.datanode" : "false",
+    "mapreduce.job.reduces" : "0",
+    "mapreduce.map.sort.spill.percent" : "0.8",
+    "dfs.client.file-block-storage-locations.timeout" : "60",
+    "dfs.datanode.drop.cache.behind.writes" : "false",
+    "mapreduce.job.end-notification.retry.interval" : "1",
+    "mapreduce.job.maps" : "96",
+    "mapreduce.job.speculative.slownodethreshold" : "1.0",
+    "tfile.fs.input.buffer.size" : "262144",
+    "mapreduce.map.speculative" : "false",
+    "dfs.block.access.token.enable" : "false",
+    "dfs.journalnode.http-address" : "0.0.0.0:8480",
+    "mapreduce.job.acl-view-job" : " ",
+    "mapreduce.reduce.shuffle.retry-delay.max.ms" : "60000",
+    "yarn.ipc.serializer.type" : "protocolbuffers",
+    "mapreduce.job.end-notification.max.retry.interval" : "5",
+    "ftp.blocksize" : "67108864",
+    "mapreduce.tasktracker.http.threads" : "80",
+    "mapreduce.reduce.java.opts" : " -Xmx825955249",
+    "dfs.datanode.data.dir" : "file://${hadoop.tmp.dir}/dfs/data",
+    "ha.failover-controller.cli-check.rpc-timeout.ms" : "20000",
+    "dfs.namenode.max.extra.edits.segments.retained" : "10000",
+    "dfs.https.port" : "20102",
+    "dfs.namenode.replication.interval" : "3",
+    "mapreduce.task.skip.start.attempts" : "2",
+    "dfs.namenode.https-address" : "a2115.halxg.cloudera.com:20102",
+    "mapreduce.jobtracker.persist.jobstatus.dir" : "/jobtracker/jobsInfo",
+    "ipc.client.kill.max" : "10",
+    "dfs.ha.automatic-failover.enabled" : "false",
+    "mapreduce.jobhistory.keytab" : "/etc/security/keytab/jhs.service.keytab",
+    "dfs.image.transfer.timeout" : "600000",
+    "dfs.client.failover.sleep.max.millis" : "15000",
+    "mapreduce.job.end-notification.max.attempts" : "5",
+    "mapreduce.task.tmp.dir" : "./tmp",
+    "dfs.default.chunk.view.size" : "32768",
+    "kfs.bytes-per-checksum" : "512",
+    "mapreduce.reduce.memory.mb" : "1024",
+    "hadoop.http.filter.initializers" : "org.apache.hadoop.yarn.server.webproxy.amfilter.AmFilterInitializer",
+    "dfs.datanode.failed.volumes.tolerated" : "0",
+    "hadoop.http.authentication.type" : "simple",
+    "dfs.datanode.data.dir.perm" : "700",
+    "yarn.resourcemanager.client.thread-count" : "50",
+    "ipc.server.listen.queue.size" : "128",
+    "mapreduce.reduce.skip.maxgroups" : "0",
+    "file.stream-buffer-size" : "4096",
+    "dfs.namenode.fs-limits.max-directory-items" : "0",
+    "io.mapfile.bloom.size" : "1048576",
+    "yarn.nodemanager.container-executor.class" : "org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor",
+    "mapreduce.map.maxattempts" : "4",
+    "mapreduce.jobtracker.jobhistory.block.size" : "3145728",
+    "yarn.log-aggregation.retain-seconds" : "-1",
+    "yarn.app.mapreduce.am.job.committer.cancel-timeout" : "60000",
+    "ftp.replication" : "3",
+    "mapreduce.jobtracker.http.address" : "0.0.0.0:50030",
+    "yarn.nodemanager.health-checker.script.timeout-ms" : "1200000",
+    "mapreduce.jobhistory.address" : "a2115.halxg.cloudera.com:10020",
+    "mapreduce.jobtracker.taskcache.levels" : "2",
+    "dfs.datanode.dns.nameserver" : "default",
+    "mapreduce.application.classpath" : "$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*,$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*",
+    "yarn.nodemanager.log.retain-seconds" : "10800",
+    "mapred.child.java.opts" : "-Xmx200m",
+    "dfs.replication.max" : "512",
+    "map.sort.class" : "org.apache.hadoop.util.QuickSort",
+    "dfs.stream-buffer-size" : "4096",
+    "dfs.namenode.backup.address" : "0.0.0.0:50100",
+    "hadoop.util.hash.type" : "murmur",
+    "dfs.block.access.key.update.interval" : "600",
+    "mapreduce.reduce.skip.proc.count.autoincr" : "true",
+    "dfs.datanode.dns.interface" : "default",
+    "dfs.datanode.use.datanode.hostname" : "false",
+    "mapreduce.job.output.key.class" : "org.apache.hadoop.io.Text",
+    "dfs.client.read.shortcircuit" : "false",
+    "dfs.namenode.backup.http-address" : "0.0.0.0:50105",
+    "yarn.nodemanager.container-monitor.interval-ms" : "3000",
+    "yarn.nodemanager.disk-health-checker.min-healthy-disks" : "0.25",
+    "kfs.client-write-packet-size" : "65536",
+    "ha.zookeeper.acl" : "world:anyone:rwcda",
+    "yarn.nodemanager.sleep-delay-before-sigkill.ms" : "250",
+    "mapreduce.job.dir" : "/user/jenkins/.staging/job_1369942127770_1206",
+    "io.map.index.skip" : "0",
+    "net.topology.node.switch.mapping.impl" : "org.apache.hadoop.net.ScriptBasedMapping",
+    "fs.s3.maxRetries" : "4",
+    "dfs.namenode.logging.level" : "info",
+    "ha.failover-controller.new-active.rpc-timeout.ms" : "60000",
+    "s3native.client-write-packet-size" : "65536",
+    "yarn.resourcemanager.amliveliness-monitor.interval-ms" : "1000",
+    "hadoop.http.staticuser.user" : "dr.who",
+    "mapreduce.reduce.speculative" : "false",
+    "mapreduce.client.output.filter" : "FAILED",
+    "mapreduce.ifile.readahead.bytes" : "4194304",
+    "mapreduce.tasktracker.report.address" : "127.0.0.1:0",
+    "mapreduce.task.userlog.limit.kb" : "0",
+    "mapreduce.tasktracker.map.tasks.maximum" : "2",
+    "hadoop.http.authentication.simple.anonymous.allowed" : "true",
+    "hadoop.fuse.timer.period" : "5",
+    "dfs.namenode.num.extra.edits.retained" : "1000000",
+    "hadoop.rpc.socket.factory.class.default" : "org.apache.hadoop.net.StandardSocketFactory",
+    "mapreduce.job.submithostname" : "a2115.halxg.cloudera.com",
+    "dfs.namenode.handler.count" : "10",
+    "fs.automatic.close" : "false",
+    "mapreduce.job.submithostaddress" : "10.20.206.115",
+    "mapreduce.tasktracker.healthchecker.script.timeout" : "600000",
+    "dfs.datanode.directoryscan.interval" : "21600",
+    "yarn.resourcemanager.address" : "a2115.halxg.cloudera.com:8032",
+    "yarn.nodemanager.health-checker.interval-ms" : "600000",
+    "dfs.client.file-block-storage-locations.num-threads" : "10",
+    "yarn.resourcemanager.container-tokens.master-key-rolling-interval-secs" : "86400",
+    "mapreduce.reduce.markreset.buffer.percent" : "0.0",
+    "hadoop.security.group.mapping.ldap.directory.search.timeout" : "10000",
+    "mapreduce.map.log.level" : "INFO",
+    "dfs.bytes-per-checksum" : "512",
+    "yarn.nodemanager.localizer.address" : "0.0.0.0:8040",
+    "dfs.namenode.checkpoint.max-retries" : "3",
+    "ha.health-monitor.rpc-timeout.ms" : "45000",
+    "yarn.resourcemanager.keytab" : "/etc/krb5.keytab",
+    "ftp.stream-buffer-size" : "4096",
+    "dfs.namenode.avoid.write.stale.datanode" : "false",
+    "hadoop.security.group.mapping.ldap.search.attr.member" : "member",
+    "mapreduce.output.fileoutputformat.outputdir" : "hdfs://a2115.halxg.cloudera.com:8020/user/jenkins/tera-gen-2",
+    "dfs.blockreport.initialDelay" : "0",
+    "yarn.nm.liveness-monitor.expiry-interval-ms" : "600000",
+    "hadoop.http.authentication.token.validity" : "36000",
+    "dfs.namenode.delegation.token.max-lifetime" : "604800000",
+    "mapreduce.job.hdfs-servers" : "${fs.defaultFS}",
+    "s3native.replication" : "3",
+    "yarn.nodemanager.localizer.client.thread-count" : "5",
+    "dfs.heartbeat.interval" : "3",
+    "rpc.engine.org.apache.hadoop.ipc.ProtocolMetaInfoPB" : "org.apache.hadoop.ipc.ProtobufRpcEngine",
+    "dfs.ha.fencing.ssh.connect-timeout" : "30000",
+    "yarn.resourcemanager.container.liveness-monitor.interval-ms" : "600000",
+    "yarn.am.liveness-monitor.expiry-interval-ms" : "600000",
+    "mapreduce.task.profile" : "false",
+    "mapreduce.tasktracker.http.address" : "0.0.0.0:50060",
+    "mapreduce.tasktracker.instrumentation" : "org.apache.hadoop.mapred.TaskTrackerMetricsInst",
+    "mapreduce.jobhistory.webapp.address" : "a2115.halxg.cloudera.com:19888",
+    "ha.failover-controller.graceful-fence.rpc-timeout.ms" : "5000",
+    "yarn.ipc.rpc.class" : "org.apache.hadoop.yarn.ipc.HadoopYarnProtoRPC",
+    "mapreduce.job.name" : "TeraGen",
+    "kfs.blocksize" : "67108864",
+    "yarn.resourcemanager.application-tokens.master-key-rolling-interval-secs" : "86400",
+    "mapreduce.job.ubertask.maxmaps" : "9",
+    "yarn.scheduler.maximum-allocation-mb" : "8192",
+    "yarn.nodemanager.heartbeat.interval-ms" : "1000",
+    "mapreduce.job.userlog.retain.hours" : "24",
+    "dfs.namenode.secondary.http-address" : "0.0.0.0:50090",
+    "mapreduce.task.timeout" : "600000",
+    "mapreduce.framework.name" : "yarn",
+    "ipc.client.idlethreshold" : "4000",
+    "ftp.bytes-per-checksum" : "512",
+    "ipc.server.tcpnodelay" : "false",
+    "dfs.namenode.stale.datanode.interval" : "30000",
+    "s3.bytes-per-checksum" : "512",
+    "mapreduce.job.speculative.slowtaskthreshold" : "1.0",
+    "yarn.nodemanager.localizer.cache.target-size-mb" : "10240",
+    "yarn.nodemanager.remote-app-log-dir" : "/tmp/logs",
+    "fs.s3.block.size" : "67108864",
+    "mapreduce.job.queuename" : "sls_queue_1",
+    "dfs.client.failover.connection.retries" : "0",
+    "hadoop.rpc.protection" : "authentication",
+    "yarn.scheduler.minimum-allocation-mb" : "1024",
+    "yarn.app.mapreduce.client-am.ipc.max-retries" : "1",
+    "hadoop.security.auth_to_local" : "DEFAULT",
+    "dfs.secondary.namenode.kerberos.internal.spnego.principal" : "${dfs.web.authentication.kerberos.principal}",
+    "ftp.client-write-packet-size" : "65536",
+    "fs.defaultFS" : "hdfs://a2115.halxg.cloudera.com:8020",
+    "yarn.nodemanager.address" : "0.0.0.0:0",
+    "yarn.scheduler.fair.assignmultiple" : "true",
+    "yarn.resourcemanager.scheduler.client.thread-count" : "50",
+    "mapreduce.task.merge.progress.records" : "10000",
+    "file.client-write-packet-size" : "65536",
+    "yarn.nodemanager.delete.thread-count" : "4",
+    "yarn.resourcemanager.scheduler.address" : "a2115.halxg.cloudera.com:8030",
+    "fs.trash.checkpoint.interval" : "0",
+    "hadoop.http.authentication.signature.secret.file" : "${user.home}/hadoop-http-auth-signature-secret",
+    "s3native.stream-buffer-size" : "4096",
+    "mapreduce.reduce.shuffle.read.timeout" : "180000",
+    "mapreduce.admin.user.env" : "LD_LIBRARY_PATH=$HADOOP_COMMON_HOME/lib/native",
+    "yarn.app.mapreduce.am.command-opts" : " -Xmx1238932873",
+    "mapreduce.local.clientfactory.class.name" : "org.apache.hadoop.mapred.LocalClientFactory",
+    "dfs.namenode.checkpoint.edits.dir" : "${dfs.namenode.checkpoint.dir}",
+    "fs.permissions.umask-mode" : "022",
+    "dfs.client.domain.socket.data.traffic" : "false",
+    "hadoop.common.configuration.version" : "0.23.0",
+    "mapreduce.tasktracker.dns.interface" : "default",
+    "mapreduce.output.fileoutputformat.compress.type" : "BLOCK",
+    "mapreduce.ifile.readahead" : "true",
+    "hadoop.security.group.mapping.ldap.ssl" : "false",
+    "io.serializations" : "org.apache.hadoop.io.serializer.WritableSerialization,org.apache.hadoop.io.serializer.avro.AvroSpecificSerialization,org.apache.hadoop.io.serializer.avro.AvroReflectSerialization",
+    "yarn.nodemanager.aux-services.mapreduce.shuffle.class" : "org.apache.hadoop.mapred.ShuffleHandler",
+    "fs.df.interval" : "60000",
+    "mapreduce.reduce.shuffle.input.buffer.percent" : "0.70",
+    "io.seqfile.compress.blocksize" : "1000000",
+    "hadoop.security.groups.cache.secs" : "300",
+    "ipc.client.connect.max.retries" : "10",
+    "dfs.namenode.delegation.key.update-interval" : "86400000",
+    "yarn.nodemanager.process-kill-wait.ms" : "2000",
+    "yarn.application.classpath" : "$HADOOP_CONF_DIR,$HADOOP_COMMON_HOME/*,$HADOOP_COMMON_HOME/lib/*,$HADOOP_HDFS_HOME/*,$HADOOP_HDFS_HOME/lib/*,$HADOOP_MAPRED_HOME/*,$HADOOP_MAPRED_HOME/lib/*,$YARN_HOME/*,$YARN_HOME/lib/*",
+    "yarn.app.mapreduce.client.max-retries" : "3",
+    "dfs.datanode.available-space-volume-choosing-policy.balanced-space-preference-fraction" : "0.75f",
+    "yarn.nodemanager.log-aggregation.compression-type" : "none",
+    "hadoop.security.group.mapping.ldap.search.filter.user" : "(&(objectClass=user)(sAMAccountName={0}))",
+    "yarn.nodemanager.localizer.cache.cleanup.interval-ms" : "600000",
+    "dfs.image.compress" : "false",
+    "mapred.mapper.new-api" : "true",
+    "yarn.nodemanager.log-dirs" : "${yarn.log.dir}/userlogs",
+    "dfs.namenode.kerberos.internal.spnego.principal" : "${dfs.web.authentication.kerberos.principal}",
+    "fs.s3n.block.size" : "67108864",
+    "fs.ftp.host" : "0.0.0.0",
+    "hadoop.security.group.mapping" : "org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback",
+    "dfs.datanode.address" : "0.0.0.0:50010",
+    "mapreduce.map.skip.maxrecords" : "0",
+    "dfs.datanode.https.address" : "0.0.0.0:50475",
+    "file.replication" : "1",
+    "yarn.resourcemanager.resource-tracker.address" : "a2115.halxg.cloudera.com:8031",
+    "dfs.datanode.drop.cache.behind.reads" : "false",
+    "hadoop.fuse.connection.timeout" : "300",
+    "hadoop.work.around.non.threadsafe.getpwuid" : "false",
+    "mapreduce.jobtracker.restart.recover" : "false",
+    "hadoop.tmp.dir" : "/tmp/hadoop-${user.name}",
+    "mapreduce.output.fileoutputformat.compress" : "false",
+    "mapreduce.tasktracker.indexcache.mb" : "10",
+    "mapreduce.client.genericoptionsparser.used" : "true",
+    "dfs.client.block.write.replace-datanode-on-failure.policy" : "DEFAULT",
+    "mapreduce.job.committer.setup.cleanup.needed" : "true",
+    "hadoop.kerberos.kinit.command" : "kinit",
+    "dfs.datanode.du.reserved" : "0",
+    "dfs.namenode.fs-limits.max-blocks-per-file" : "1048576",
+    "dfs.webhdfs.enabled" : "false",
+    "file.bytes-per-checksum" : "512",
+    "mapreduce.task.profile.reduces" : "0-2",
+    "mapreduce.jobtracker.handler.count" : "10",
+    "dfs.client.block.write.replace-datanode-on-failure.enable" : "true",
+    "mapreduce.job.output.value.class" : "org.apache.hadoop.io.Text",
+    "yarn.dispatcher.exit-on-error" : "true",
+    "net.topology.script.number.args" : "100",
+    "mapreduce.task.profile.maps" : "0-2",
+    "dfs.namenode.decommission.interval" : "30",
+    "dfs.image.compression.codec" : "org.apache.hadoop.io.compress.DefaultCodec",
+    "yarn.resourcemanager.webapp.address" : "a2115.halxg.cloudera.com:8088",
+    "mapreduce.jobtracker.system.dir" : "${hadoop.tmp.dir}/mapred/system",
+    "hadoop.ssl.hostname.verifier" : "DEFAULT",
+    "yarn.nodemanager.vmem-pmem-ratio" : "2.1",
+    "dfs.namenode.support.allow.format" : "true",
+    "mapreduce.jobhistory.principal" : "jhs/_HOST@REALM.TLD",
+    "io.mapfile.bloom.error.rate" : "0.005",
+    "mapreduce.shuffle.ssl.file.buffer.size" : "65536",
+    "dfs.permissions.superusergroup" : "supergroup",
+    "dfs.datanode.available-space-volume-choosing-policy.balanced-space-threshold" : "10737418240",
+    "mapreduce.jobtracker.expire.trackers.interval" : "600000",
+    "mapreduce.cluster.acls.enabled" : "false",
+    "yarn.nodemanager.remote-app-log-dir-suffix" : "logs",
+    "ha.failover-controller.graceful-fence.connection.retries" : "1",
+    "ha.health-monitor.connect-retry-interval.ms" : "1000",
+    "mapreduce.reduce.shuffle.merge.percent" : "0.66",
+    "yarn.app.mapreduce.am.resource.mb" : "1536",
+    "io.seqfile.local.dir" : "${hadoop.tmp.dir}/io/local",
+    "dfs.namenode.checkpoint.check.period" : "60",
+    "yarn.resourcemanager.nm.liveness-monitor.interval-ms" : "1000",
+    "mapreduce.jobtracker.maxtasks.perjob" : "-1",
+    "mapreduce.jobtracker.jobhistory.lru.cache.size" : "5",
+    "file.blocksize" : "67108864",
+    "tfile.io.chunk.size" : "1048576",
+    "mapreduce.job.acl-modify-job" : " ",
+    "yarn.nodemanager.webapp.address" : "0.0.0.0:8042",
+    "mapreduce.tasktracker.reduce.tasks.maximum" : "2",
+    "io.skip.checksum.errors" : "false",
+    "mapreduce.cluster.temp.dir" : "${hadoop.tmp.dir}/mapred/temp",
+    "yarn.app.mapreduce.am.staging-dir" : "/user",
+    "dfs.namenode.edits.journal-plugin.qjournal" : "org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager",
+    "dfs.datanode.handler.count" : "10",
+    "fs.ftp.host.port" : "21",
+    "dfs.namenode.decommission.nodes.per.interval" : "5",
+    "yarn.resourcemanager.admin.client.thread-count" : "1",
+    "dfs.namenode.fs-limits.max-component-length" : "0",
+    "dfs.namenode.checkpoint.period" : "3600",
+    "fs.AbstractFileSystem.viewfs.impl" : "org.apache.hadoop.fs.viewfs.ViewFs",
+    "yarn.resourcemanager.resource-tracker.client.thread-count" : "50",
+    "mapreduce.tasktracker.dns.nameserver" : "default",
+    "mapreduce.map.output.compress" : "true",
+    "dfs.datanode.ipc.address" : "0.0.0.0:50020",
+    "hadoop.ssl.require.client.cert" : "false",
+    "yarn.nodemanager.delete.debug-delay-sec" : "0",
+    "dfs.datanode.max.transfer.threads" : "4096"
+  },
+  "computonsPerMapInputByte" : -1,
+  "computonsPerMapOutputByte" : -1,
+  "computonsPerReduceInputByte" : -1,
+  "computonsPerReduceOutputByte" : -1,
+  "heapMegabytes" : 200,
+  "outcome" : "SUCCESS",
+  "jobtype" : "JAVA",
+  "directDependantJobs" : [ ],
+  "successfulMapAttemptCDFs" : [ {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 32847,
+    "minimum" : 11897,
+    "rankings" : [ {
+      "datum" : 14151,
+      "relativeRanking" : 0.05
+    }, {
+      "datum" : 15844,
+      "relativeRanking" : 0.1
+    }, {
+      "datum" : 18656,
+      "relativeRanking" : 0.15
+    }, {
+      "datum" : 18806,
+      "relativeRanking" : 0.2
+    }, {
+      "datum" : 18840,
+      "relativeRanking" : 0.25
+    }, {
+      "datum" : 18982,
+      "relativeRanking" : 0.3
+    }, {
+      "datum" : 19314,
+      "relativeRanking" : 0.35
+    }, {
+      "datum" : 19587,
+      "relativeRanking" : 0.4
+    }, {
+      "datum" : 19703,
+      "relativeRanking" : 0.45
+    }, {
+      "datum" : 19800,
+      "relativeRanking" : 0.5
+    }, {
+      "datum" : 19965,
+      "relativeRanking" : 0.55
+    }, {
+      "datum" : 20604,
+      "relativeRanking" : 0.6
+    }, {
+      "datum" : 20892,
+      "relativeRanking" : 0.65
+    }, {
+      "datum" : 21526,
+      "relativeRanking" : 0.7
+    }, {
+      "datum" : 21911,
+      "relativeRanking" : 0.75
+    }, {
+      "datum" : 22144,
+      "relativeRanking" : 0.8
+    }, {
+      "datum" : 22539,
+      "relativeRanking" : 0.85
+    }, {
+      "datum" : 23034,
+      "relativeRanking" : 0.9
+    }, {
+      "datum" : 23601,
+      "relativeRanking" : 0.95
+    } ],
+    "numberValues" : 96
+  } ],
+  "failedMapAttemptCDFs" : [ {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  }, {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  } ],
+  "successfulReduceAttemptCDF" : {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  },
+  "failedReduceAttemptCDF" : {
+    "maximum" : 9223372036854775807,
+    "minimum" : -9223372036854775808,
+    "rankings" : [ ],
+    "numberValues" : 0
+  },
+  "mapperTriesToSucceed" : [ 1.0 ],
+  "failedMapperFraction" : 0.0,
+  "relativeTime" : 0,
+  "clusterMapMB" : -1,
+  "clusterReduceMB" : -1,
+  "jobMapMB" : 200,
+  "jobReduceMB" : 200
+}

文件差異過大導致無法顯示
+ 18 - 0
hadoop-tools/hadoop-sls/src/main/html/css/bootstrap-responsive.min.css


文件差異過大導致無法顯示
+ 36 - 0
hadoop-tools/hadoop-sls/src/main/html/css/bootstrap.min.css


文件差異過大導致無法顯示
+ 5 - 0
hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/bootstrap.min.js


+ 26 - 0
hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3-LICENSE

@@ -0,0 +1,26 @@
+Copyright (c) 2013, Michael Bostock
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* The name Michael Bostock may not be used to endorse or promote products
+  derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 8823 - 0
hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js

@@ -0,0 +1,8823 @@
+/*!
+* Copyright (c) 2013, Michael Bostock
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+  * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+  * The name Michael Bostock may not be used to endorse or promote products
+    derived from this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+  DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
+  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+  OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+d3 = function() {
+  var d3 = {
+    version: "3.2.7"
+  };
+  if (!Date.now) Date.now = function() {
+    return +new Date();
+  };
+  var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window;
+  try {
+    d3_document.createElement("div").style.setProperty("opacity", 0, "");
+  } catch (error) {
+    var d3_element_prototype = d3_window.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = d3_window.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
+    d3_element_prototype.setAttribute = function(name, value) {
+      d3_element_setAttribute.call(this, name, value + "");
+    };
+    d3_element_prototype.setAttributeNS = function(space, local, value) {
+      d3_element_setAttributeNS.call(this, space, local, value + "");
+    };
+    d3_style_prototype.setProperty = function(name, value, priority) {
+      d3_style_setProperty.call(this, name, value + "", priority);
+    };
+  }
+  d3.ascending = function(a, b) {
+    return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
+  };
+  d3.descending = function(a, b) {
+    return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
+  };
+  d3.min = function(array, f) {
+    var i = -1, n = array.length, a, b;
+    if (arguments.length === 1) {
+      while (++i < n && !((a = array[i]) != null && a <= a)) a = undefined;
+      while (++i < n) if ((b = array[i]) != null && a > b) a = b;
+    } else {
+      while (++i < n && !((a = f.call(array, array[i], i)) != null && a <= a)) a = undefined;
+      while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
+    }
+    return a;
+  };
+  d3.max = function(array, f) {
+    var i = -1, n = array.length, a, b;
+    if (arguments.length === 1) {
+      while (++i < n && !((a = array[i]) != null && a <= a)) a = undefined;
+      while (++i < n) if ((b = array[i]) != null && b > a) a = b;
+    } else {
+      while (++i < n && !((a = f.call(array, array[i], i)) != null && a <= a)) a = undefined;
+      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
+    }
+    return a;
+  };
+  d3.extent = function(array, f) {
+    var i = -1, n = array.length, a, b, c;
+    if (arguments.length === 1) {
+      while (++i < n && !((a = c = array[i]) != null && a <= a)) a = c = undefined;
+      while (++i < n) if ((b = array[i]) != null) {
+        if (a > b) a = b;
+        if (c < b) c = b;
+      }
+    } else {
+      while (++i < n && !((a = c = f.call(array, array[i], i)) != null && a <= a)) a = undefined;
+      while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
+        if (a > b) a = b;
+        if (c < b) c = b;
+      }
+    }
+    return [ a, c ];
+  };
+  d3.sum = function(array, f) {
+    var s = 0, n = array.length, a, i = -1;
+    if (arguments.length === 1) {
+      while (++i < n) if (!isNaN(a = +array[i])) s += a;
+    } else {
+      while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
+    }
+    return s;
+  };
+  function d3_number(x) {
+    return x != null && !isNaN(x);
+  }
+  d3.mean = function(array, f) {
+    var n = array.length, a, m = 0, i = -1, j = 0;
+    if (arguments.length === 1) {
+      while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j;
+    } else {
+      while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j;
+    }
+    return j ? m : undefined;
+  };
+  d3.quantile = function(values, p) {
+    var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h;
+    return e ? v + e * (values[h] - v) : v;
+  };
+  d3.median = function(array, f) {
+    if (arguments.length > 1) array = array.map(f);
+    array = array.filter(d3_number);
+    return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined;
+  };
+  d3.bisector = function(f) {
+    return {
+      left: function(a, x, lo, hi) {
+        if (arguments.length < 3) lo = 0;
+        if (arguments.length < 4) hi = a.length;
+        while (lo < hi) {
+          var mid = lo + hi >>> 1;
+          if (f.call(a, a[mid], mid) < x) lo = mid + 1; else hi = mid;
+        }
+        return lo;
+      },
+      right: function(a, x, lo, hi) {
+        if (arguments.length < 3) lo = 0;
+        if (arguments.length < 4) hi = a.length;
+        while (lo < hi) {
+          var mid = lo + hi >>> 1;
+          if (x < f.call(a, a[mid], mid)) hi = mid; else lo = mid + 1;
+        }
+        return lo;
+      }
+    };
+  };
+  var d3_bisector = d3.bisector(function(d) {
+    return d;
+  });
+  d3.bisectLeft = d3_bisector.left;
+  d3.bisect = d3.bisectRight = d3_bisector.right;
+  d3.shuffle = function(array) {
+    var m = array.length, t, i;
+    while (m) {
+      i = Math.random() * m-- | 0;
+      t = array[m], array[m] = array[i], array[i] = t;
+    }
+    return array;
+  };
+  d3.permute = function(array, indexes) {
+    var permutes = [], i = -1, n = indexes.length;
+    while (++i < n) permutes[i] = array[indexes[i]];
+    return permutes;
+  };
+  d3.zip = function() {
+    if (!(n = arguments.length)) return [];
+    for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) {
+      for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) {
+        zip[j] = arguments[j][i];
+      }
+    }
+    return zips;
+  };
+  function d3_zipLength(d) {
+    return d.length;
+  }
+  d3.transpose = function(matrix) {
+    return d3.zip.apply(d3, matrix);
+  };
+  d3.keys = function(map) {
+    var keys = [];
+    for (var key in map) keys.push(key);
+    return keys;
+  };
+  d3.values = function(map) {
+    var values = [];
+    for (var key in map) values.push(map[key]);
+    return values;
+  };
+  d3.entries = function(map) {
+    var entries = [];
+    for (var key in map) entries.push({
+      key: key,
+      value: map[key]
+    });
+    return entries;
+  };
+  d3.merge = function(arrays) {
+    return Array.prototype.concat.apply([], arrays);
+  };
+  d3.range = function(start, stop, step) {
+    if (arguments.length < 3) {
+      step = 1;
+      if (arguments.length < 2) {
+        stop = start;
+        start = 0;
+      }
+    }
+    if ((stop - start) / step === Infinity) throw new Error("infinite range");
+    var range = [], k = d3_range_integerScale(Math.abs(step)), i = -1, j;
+    start *= k, stop *= k, step *= k;
+    if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
+    return range;
+  };
+  function d3_range_integerScale(x) {
+    var k = 1;
+    while (x * k % 1) k *= 10;
+    return k;
+  }
+  function d3_class(ctor, properties) {
+    try {
+      for (var key in properties) {
+        Object.defineProperty(ctor.prototype, key, {
+          value: properties[key],
+          enumerable: false
+        });
+      }
+    } catch (e) {
+      ctor.prototype = properties;
+    }
+  }
+  d3.map = function(object) {
+    var map = new d3_Map();
+    for (var key in object) map.set(key, object[key]);
+    return map;
+  };
+  function d3_Map() {}
+  d3_class(d3_Map, {
+    has: function(key) {
+      return d3_map_prefix + key in this;
+    },
+    get: function(key) {
+      return this[d3_map_prefix + key];
+    },
+    set: function(key, value) {
+      return this[d3_map_prefix + key] = value;
+    },
+    remove: function(key) {
+      key = d3_map_prefix + key;
+      return key in this && delete this[key];
+    },
+    keys: function() {
+      var keys = [];
+      this.forEach(function(key) {
+        keys.push(key);
+      });
+      return keys;
+    },
+    values: function() {
+      var values = [];
+      this.forEach(function(key, value) {
+        values.push(value);
+      });
+      return values;
+    },
+    entries: function() {
+      var entries = [];
+      this.forEach(function(key, value) {
+        entries.push({
+          key: key,
+          value: value
+        });
+      });
+      return entries;
+    },
+    forEach: function(f) {
+      for (var key in this) {
+        if (key.charCodeAt(0) === d3_map_prefixCode) {
+          f.call(this, key.substring(1), this[key]);
+        }
+      }
+    }
+  });
+  var d3_map_prefix = "\0", d3_map_prefixCode = d3_map_prefix.charCodeAt(0);
+  d3.nest = function() {
+    var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
+    function map(mapType, array, depth) {
+      if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
+      var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;
+      while (++i < n) {
+        if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
+          values.push(object);
+        } else {
+          valuesByKey.set(keyValue, [ object ]);
+        }
+      }
+      if (mapType) {
+        object = mapType();
+        setter = function(keyValue, values) {
+          object.set(keyValue, map(mapType, values, depth));
+        };
+      } else {
+        object = {};
+        setter = function(keyValue, values) {
+          object[keyValue] = map(mapType, values, depth);
+        };
+      }
+      valuesByKey.forEach(setter);
+      return object;
+    }
+    function entries(map, depth) {
+      if (depth >= keys.length) return map;
+      var array = [], sortKey = sortKeys[depth++];
+      map.forEach(function(key, keyMap) {
+        array.push({
+          key: key,
+          values: entries(keyMap, depth)
+        });
+      });
+      return sortKey ? array.sort(function(a, b) {
+        return sortKey(a.key, b.key);
+      }) : array;
+    }
+    nest.map = function(array, mapType) {
+      return map(mapType, array, 0);
+    };
+    nest.entries = function(array) {
+      return entries(map(d3.map, array, 0), 0);
+    };
+    nest.key = function(d) {
+      keys.push(d);
+      return nest;
+    };
+    nest.sortKeys = function(order) {
+      sortKeys[keys.length - 1] = order;
+      return nest;
+    };
+    nest.sortValues = function(order) {
+      sortValues = order;
+      return nest;
+    };
+    nest.rollup = function(f) {
+      rollup = f;
+      return nest;
+    };
+    return nest;
+  };
+  d3.set = function(array) {
+    var set = new d3_Set();
+    if (array) for (var i = 0; i < array.length; i++) set.add(array[i]);
+    return set;
+  };
+  function d3_Set() {}
+  d3_class(d3_Set, {
+    has: function(value) {
+      return d3_map_prefix + value in this;
+    },
+    add: function(value) {
+      this[d3_map_prefix + value] = true;
+      return value;
+    },
+    remove: function(value) {
+      value = d3_map_prefix + value;
+      return value in this && delete this[value];
+    },
+    values: function() {
+      var values = [];
+      this.forEach(function(value) {
+        values.push(value);
+      });
+      return values;
+    },
+    forEach: function(f) {
+      for (var value in this) {
+        if (value.charCodeAt(0) === d3_map_prefixCode) {
+          f.call(this, value.substring(1));
+        }
+      }
+    }
+  });
+  d3.behavior = {};
+  d3.rebind = function(target, source) {
+    var i = 1, n = arguments.length, method;
+    while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
+    return target;
+  };
+  function d3_rebind(target, source, method) {
+    return function() {
+      var value = method.apply(source, arguments);
+      return value === source ? target : value;
+    };
+  }
+  function d3_vendorSymbol(object, name) {
+    if (name in object) return name;
+    name = name.charAt(0).toUpperCase() + name.substring(1);
+    for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) {
+      var prefixName = d3_vendorPrefixes[i] + name;
+      if (prefixName in object) return prefixName;
+    }
+  }
+  var d3_vendorPrefixes = [ "webkit", "ms", "moz", "Moz", "o", "O" ];
+  var d3_array = d3_arraySlice;
+  function d3_arrayCopy(pseudoarray) {
+    var i = -1, n = pseudoarray.length, array = [];
+    while (++i < n) array.push(pseudoarray[i]);
+    return array;
+  }
+  function d3_arraySlice(pseudoarray) {
+    return Array.prototype.slice.call(pseudoarray);
+  }
+  try {
+    d3_array(d3_documentElement.childNodes)[0].nodeType;
+  } catch (e) {
+    d3_array = d3_arrayCopy;
+  }
+  function d3_noop() {}
+  d3.dispatch = function() {
+    var dispatch = new d3_dispatch(), i = -1, n = arguments.length;
+    while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
+    return dispatch;
+  };
+  function d3_dispatch() {}
+  d3_dispatch.prototype.on = function(type, listener) {
+    var i = type.indexOf("."), name = "";
+    if (i >= 0) {
+      name = type.substring(i + 1);
+      type = type.substring(0, i);
+    }
+    if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
+    if (arguments.length === 2) {
+      if (listener == null) for (type in this) {
+        if (this.hasOwnProperty(type)) this[type].on(name, null);
+      }
+      return this;
+    }
+  };
+  function d3_dispatch_event(dispatch) {
+    var listeners = [], listenerByName = new d3_Map();
+    function event() {
+      var z = listeners, i = -1, n = z.length, l;
+      while (++i < n) if (l = z[i].on) l.apply(this, arguments);
+      return dispatch;
+    }
+    event.on = function(name, listener) {
+      var l = listenerByName.get(name), i;
+      if (arguments.length < 2) return l && l.on;
+      if (l) {
+        l.on = null;
+        listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
+        listenerByName.remove(name);
+      }
+      if (listener) listeners.push(listenerByName.set(name, {
+        on: listener
+      }));
+      return dispatch;
+    };
+    return event;
+  }
+  d3.event = null;
+  function d3_eventPreventDefault() {
+    d3.event.preventDefault();
+  }
+  function d3_eventSource() {
+    var e = d3.event, s;
+    while (s = e.sourceEvent) e = s;
+    return e;
+  }
+  function d3_eventDispatch(target) {
+    var dispatch = new d3_dispatch(), i = 0, n = arguments.length;
+    while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
+    dispatch.of = function(thiz, argumentz) {
+      return function(e1) {
+        try {
+          var e0 = e1.sourceEvent = d3.event;
+          e1.target = target;
+          d3.event = e1;
+          dispatch[e1.type].apply(thiz, argumentz);
+        } finally {
+          d3.event = e0;
+        }
+      };
+    };
+    return dispatch;
+  }
+  d3.requote = function(s) {
+    return s.replace(d3_requote_re, "\\$&");
+  };
+  var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
+  var d3_subclass = {}.__proto__ ? function(object, prototype) {
+    object.__proto__ = prototype;
+  } : function(object, prototype) {
+    for (var property in prototype) object[property] = prototype[property];
+  };
+  function d3_selection(groups) {
+    d3_subclass(groups, d3_selectionPrototype);
+    return groups;
+  }
+  var d3_select = function(s, n) {
+    return n.querySelector(s);
+  }, d3_selectAll = function(s, n) {
+    return n.querySelectorAll(s);
+  }, d3_selectMatcher = d3_documentElement[d3_vendorSymbol(d3_documentElement, "matchesSelector")], d3_selectMatches = function(n, s) {
+    return d3_selectMatcher.call(n, s);
+  };
+  if (typeof Sizzle === "function") {
+    d3_select = function(s, n) {
+      return Sizzle(s, n)[0] || null;
+    };
+    d3_selectAll = function(s, n) {
+      return Sizzle.uniqueSort(Sizzle(s, n));
+    };
+    d3_selectMatches = Sizzle.matchesSelector;
+  }
+  d3.selection = function() {
+    return d3_selectionRoot;
+  };
+  var d3_selectionPrototype = d3.selection.prototype = [];
+  d3_selectionPrototype.select = function(selector) {
+    var subgroups = [], subgroup, subnode, group, node;
+    selector = d3_selection_selector(selector);
+    for (var j = -1, m = this.length; ++j < m; ) {
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = (group = this[j]).parentNode;
+      for (var i = -1, n = group.length; ++i < n; ) {
+        if (node = group[i]) {
+          subgroup.push(subnode = selector.call(node, node.__data__, i, j));
+          if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
+        } else {
+          subgroup.push(null);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  };
+  function d3_selection_selector(selector) {
+    return typeof selector === "function" ? selector : function() {
+      return d3_select(selector, this);
+    };
+  }
+  d3_selectionPrototype.selectAll = function(selector) {
+    var subgroups = [], subgroup, node;
+    selector = d3_selection_selectorAll(selector);
+    for (var j = -1, m = this.length; ++j < m; ) {
+      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+        if (node = group[i]) {
+          subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j)));
+          subgroup.parentNode = node;
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  };
+  function d3_selection_selectorAll(selector) {
+    return typeof selector === "function" ? selector : function() {
+      return d3_selectAll(selector, this);
+    };
+  }
+  var d3_nsPrefix = {
+    svg: "http://www.w3.org/2000/svg",
+    xhtml: "http://www.w3.org/1999/xhtml",
+    xlink: "http://www.w3.org/1999/xlink",
+    xml: "http://www.w3.org/XML/1998/namespace",
+    xmlns: "http://www.w3.org/2000/xmlns/"
+  };
+  d3.ns = {
+    prefix: d3_nsPrefix,
+    qualify: function(name) {
+      var i = name.indexOf(":"), prefix = name;
+      if (i >= 0) {
+        prefix = name.substring(0, i);
+        name = name.substring(i + 1);
+      }
+      return d3_nsPrefix.hasOwnProperty(prefix) ? {
+        space: d3_nsPrefix[prefix],
+        local: name
+      } : name;
+    }
+  };
+  d3_selectionPrototype.attr = function(name, value) {
+    if (arguments.length < 2) {
+      if (typeof name === "string") {
+        var node = this.node();
+        name = d3.ns.qualify(name);
+        return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
+      }
+      for (value in name) this.each(d3_selection_attr(value, name[value]));
+      return this;
+    }
+    return this.each(d3_selection_attr(name, value));
+  };
+  function d3_selection_attr(name, value) {
+    name = d3.ns.qualify(name);
+    function attrNull() {
+      this.removeAttribute(name);
+    }
+    function attrNullNS() {
+      this.removeAttributeNS(name.space, name.local);
+    }
+    function attrConstant() {
+      this.setAttribute(name, value);
+    }
+    function attrConstantNS() {
+      this.setAttributeNS(name.space, name.local, value);
+    }
+    function attrFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
+    }
+    function attrFunctionNS() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
+    }
+    return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
+  }
+  function d3_collapse(s) {
+    return s.trim().replace(/\s+/g, " ");
+  }
+  d3_selectionPrototype.classed = function(name, value) {
+    if (arguments.length < 2) {
+      if (typeof name === "string") {
+        var node = this.node(), n = (name = name.trim().split(/^|\s+/g)).length, i = -1;
+        if (value = node.classList) {
+          while (++i < n) if (!value.contains(name[i])) return false;
+        } else {
+          value = node.getAttribute("class");
+          while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
+        }
+        return true;
+      }
+      for (value in name) this.each(d3_selection_classed(value, name[value]));
+      return this;
+    }
+    return this.each(d3_selection_classed(name, value));
+  };
+  function d3_selection_classedRe(name) {
+    return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
+  }
+  function d3_selection_classed(name, value) {
+    name = name.trim().split(/\s+/).map(d3_selection_classedName);
+    var n = name.length;
+    function classedConstant() {
+      var i = -1;
+      while (++i < n) name[i](this, value);
+    }
+    function classedFunction() {
+      var i = -1, x = value.apply(this, arguments);
+      while (++i < n) name[i](this, x);
+    }
+    return typeof value === "function" ? classedFunction : classedConstant;
+  }
+  function d3_selection_classedName(name) {
+    var re = d3_selection_classedRe(name);
+    return function(node, value) {
+      if (c = node.classList) return value ? c.add(name) : c.remove(name);
+      var c = node.getAttribute("class") || "";
+      if (value) {
+        re.lastIndex = 0;
+        if (!re.test(c)) node.setAttribute("class", d3_collapse(c + " " + name));
+      } else {
+        node.setAttribute("class", d3_collapse(c.replace(re, " ")));
+      }
+    };
+  }
+  d3_selectionPrototype.style = function(name, value, priority) {
+    var n = arguments.length;
+    if (n < 3) {
+      if (typeof name !== "string") {
+        if (n < 2) value = "";
+        for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
+        return this;
+      }
+      if (n < 2) return d3_window.getComputedStyle(this.node(), null).getPropertyValue(name);
+      priority = "";
+    }
+    return this.each(d3_selection_style(name, value, priority));
+  };
+  function d3_selection_style(name, value, priority) {
+    function styleNull() {
+      this.style.removeProperty(name);
+    }
+    function styleConstant() {
+      this.style.setProperty(name, value, priority);
+    }
+    function styleFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
+    }
+    return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
+  }
+  d3_selectionPrototype.property = function(name, value) {
+    if (arguments.length < 2) {
+      if (typeof name === "string") return this.node()[name];
+      for (value in name) this.each(d3_selection_property(value, name[value]));
+      return this;
+    }
+    return this.each(d3_selection_property(name, value));
+  };
+  function d3_selection_property(name, value) {
+    function propertyNull() {
+      delete this[name];
+    }
+    function propertyConstant() {
+      this[name] = value;
+    }
+    function propertyFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) delete this[name]; else this[name] = x;
+    }
+    return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
+  }
+  d3_selectionPrototype.text = function(value) {
+    return arguments.length ? this.each(typeof value === "function" ? function() {
+      var v = value.apply(this, arguments);
+      this.textContent = v == null ? "" : v;
+    } : value == null ? function() {
+      this.textContent = "";
+    } : function() {
+      this.textContent = value;
+    }) : this.node().textContent;
+  };
+  d3_selectionPrototype.html = function(value) {
+    return arguments.length ? this.each(typeof value === "function" ? function() {
+      var v = value.apply(this, arguments);
+      this.innerHTML = v == null ? "" : v;
+    } : value == null ? function() {
+      this.innerHTML = "";
+    } : function() {
+      this.innerHTML = value;
+    }) : this.node().innerHTML;
+  };
+  d3_selectionPrototype.append = function(name) {
+    name = d3_selection_creator(name);
+    return this.select(function() {
+      return this.appendChild(name.apply(this, arguments));
+    });
+  };
+  function d3_selection_creator(name) {
+    return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? function() {
+      return d3_document.createElementNS(name.space, name.local);
+    } : function() {
+      return d3_document.createElementNS(this.namespaceURI, name);
+    };
+  }
+  d3_selectionPrototype.insert = function(name, before) {
+    name = d3_selection_creator(name);
+    before = d3_selection_selector(before);
+    return this.select(function() {
+      return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments));
+    });
+  };
+  d3_selectionPrototype.remove = function() {
+    return this.each(function() {
+      var parent = this.parentNode;
+      if (parent) parent.removeChild(this);
+    });
+  };
+  d3_selectionPrototype.data = function(value, key) {
+    var i = -1, n = this.length, group, node;
+    if (!arguments.length) {
+      value = new Array(n = (group = this[0]).length);
+      while (++i < n) {
+        if (node = group[i]) {
+          value[i] = node.__data__;
+        }
+      }
+      return value;
+    }
+    function bind(group, groupData) {
+      var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;
+      if (key) {
+        var nodeByKeyValue = new d3_Map(), dataByKeyValue = new d3_Map(), keyValues = [], keyValue;
+        for (i = -1; ++i < n; ) {
+          keyValue = key.call(node = group[i], node.__data__, i);
+          if (nodeByKeyValue.has(keyValue)) {
+            exitNodes[i] = node;
+          } else {
+            nodeByKeyValue.set(keyValue, node);
+          }
+          keyValues.push(keyValue);
+        }
+        for (i = -1; ++i < m; ) {
+          keyValue = key.call(groupData, nodeData = groupData[i], i);
+          if (node = nodeByKeyValue.get(keyValue)) {
+            updateNodes[i] = node;
+            node.__data__ = nodeData;
+          } else if (!dataByKeyValue.has(keyValue)) {
+            enterNodes[i] = d3_selection_dataNode(nodeData);
+          }
+          dataByKeyValue.set(keyValue, nodeData);
+          nodeByKeyValue.remove(keyValue);
+        }
+        for (i = -1; ++i < n; ) {
+          if (nodeByKeyValue.has(keyValues[i])) {
+            exitNodes[i] = group[i];
+          }
+        }
+      } else {
+        for (i = -1; ++i < n0; ) {
+          node = group[i];
+          nodeData = groupData[i];
+          if (node) {
+            node.__data__ = nodeData;
+            updateNodes[i] = node;
+          } else {
+            enterNodes[i] = d3_selection_dataNode(nodeData);
+          }
+        }
+        for (;i < m; ++i) {
+          enterNodes[i] = d3_selection_dataNode(groupData[i]);
+        }
+        for (;i < n; ++i) {
+          exitNodes[i] = group[i];
+        }
+      }
+      enterNodes.update = updateNodes;
+      enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
+      enter.push(enterNodes);
+      update.push(updateNodes);
+      exit.push(exitNodes);
+    }
+    var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
+    if (typeof value === "function") {
+      while (++i < n) {
+        bind(group = this[i], value.call(group, group.parentNode.__data__, i));
+      }
+    } else {
+      while (++i < n) {
+        bind(group = this[i], value);
+      }
+    }
+    update.enter = function() {
+      return enter;
+    };
+    update.exit = function() {
+      return exit;
+    };
+    return update;
+  };
+  function d3_selection_dataNode(data) {
+    return {
+      __data__: data
+    };
+  }
+  d3_selectionPrototype.datum = function(value) {
+    return arguments.length ? this.property("__data__", value) : this.property("__data__");
+  };
+  d3_selectionPrototype.filter = function(filter) {
+    var subgroups = [], subgroup, group, node;
+    if (typeof filter !== "function") filter = d3_selection_filter(filter);
+    for (var j = 0, m = this.length; j < m; j++) {
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = (group = this[j]).parentNode;
+      for (var i = 0, n = group.length; i < n; i++) {
+        if ((node = group[i]) && filter.call(node, node.__data__, i)) {
+          subgroup.push(node);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  };
+  function d3_selection_filter(selector) {
+    return function() {
+      return d3_selectMatches(this, selector);
+    };
+  }
+  d3_selectionPrototype.order = function() {
+    for (var j = -1, m = this.length; ++j < m; ) {
+      for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
+        if (node = group[i]) {
+          if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
+          next = node;
+        }
+      }
+    }
+    return this;
+  };
+  d3_selectionPrototype.sort = function(comparator) {
+    comparator = d3_selection_sortComparator.apply(this, arguments);
+    for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
+    return this.order();
+  };
+  function d3_selection_sortComparator(comparator) {
+    if (!arguments.length) comparator = d3.ascending;
+    return function(a, b) {
+      return !a - !b || comparator(a.__data__, b.__data__);
+    };
+  }
+  d3_selectionPrototype.each = function(callback) {
+    return d3_selection_each(this, function(node, i, j) {
+      callback.call(node, node.__data__, i, j);
+    });
+  };
+  function d3_selection_each(groups, callback) {
+    for (var j = 0, m = groups.length; j < m; j++) {
+      for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
+        if (node = group[i]) callback(node, i, j);
+      }
+    }
+    return groups;
+  }
+  d3_selectionPrototype.call = function(callback) {
+    var args = d3_array(arguments);
+    callback.apply(args[0] = this, args);
+    return this;
+  };
+  d3_selectionPrototype.empty = function() {
+    return !this.node();
+  };
+  d3_selectionPrototype.node = function() {
+    for (var j = 0, m = this.length; j < m; j++) {
+      for (var group = this[j], i = 0, n = group.length; i < n; i++) {
+        var node = group[i];
+        if (node) return node;
+      }
+    }
+    return null;
+  };
+  d3_selectionPrototype.size = function() {
+    var n = 0;
+    this.each(function() {
+      ++n;
+    });
+    return n;
+  };
+  function d3_selection_enter(selection) {
+    d3_subclass(selection, d3_selection_enterPrototype);
+    return selection;
+  }
+  var d3_selection_enterPrototype = [];
+  d3.selection.enter = d3_selection_enter;
+  d3.selection.enter.prototype = d3_selection_enterPrototype;
+  d3_selection_enterPrototype.append = d3_selectionPrototype.append;
+  d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
+  d3_selection_enterPrototype.node = d3_selectionPrototype.node;
+  d3_selection_enterPrototype.call = d3_selectionPrototype.call;
+  d3_selection_enterPrototype.size = d3_selectionPrototype.size;
+  d3_selection_enterPrototype.select = function(selector) {
+    var subgroups = [], subgroup, subnode, upgroup, group, node;
+    for (var j = -1, m = this.length; ++j < m; ) {
+      upgroup = (group = this[j]).update;
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = group.parentNode;
+      for (var i = -1, n = group.length; ++i < n; ) {
+        if (node = group[i]) {
+          subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j));
+          subnode.__data__ = node.__data__;
+        } else {
+          subgroup.push(null);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  };
+  d3_selection_enterPrototype.insert = function(name, before) {
+    if (arguments.length < 2) before = d3_selection_enterInsertBefore(this);
+    return d3_selectionPrototype.insert.call(this, name, before);
+  };
+  function d3_selection_enterInsertBefore(enter) {
+    var i0, j0;
+    return function(d, i, j) {
+      var group = enter[j].update, n = group.length, node;
+      if (j != j0) j0 = j, i0 = 0;
+      if (i >= i0) i0 = i + 1;
+      while (!(node = group[i0]) && ++i0 < n) ;
+      return node;
+    };
+  }
+  d3_selectionPrototype.transition = function() {
+    var id = d3_transitionInheritId || ++d3_transitionId, subgroups = [], subgroup, node, transition = d3_transitionInherit || {
+      time: Date.now(),
+      ease: d3_ease_cubicInOut,
+      delay: 0,
+      duration: 250
+    };
+    for (var j = -1, m = this.length; ++j < m; ) {
+      subgroups.push(subgroup = []);
+      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+        if (node = group[i]) d3_transitionNode(node, i, id, transition);
+        subgroup.push(node);
+      }
+    }
+    return d3_transition(subgroups, id);
+  };
+  d3.select = function(node) {
+    var group = [ typeof node === "string" ? d3_select(node, d3_document) : node ];
+    group.parentNode = d3_documentElement;
+    return d3_selection([ group ]);
+  };
+  d3.selectAll = function(nodes) {
+    var group = d3_array(typeof nodes === "string" ? d3_selectAll(nodes, d3_document) : nodes);
+    group.parentNode = d3_documentElement;
+    return d3_selection([ group ]);
+  };
+  var d3_selectionRoot = d3.select(d3_documentElement);
+  d3_selectionPrototype.on = function(type, listener, capture) {
+    var n = arguments.length;
+    if (n < 3) {
+      if (typeof type !== "string") {
+        if (n < 2) listener = false;
+        for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
+        return this;
+      }
+      if (n < 2) return (n = this.node()["__on" + type]) && n._;
+      capture = false;
+    }
+    return this.each(d3_selection_on(type, listener, capture));
+  };
+  function d3_selection_on(type, listener, capture) {
+    var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener;
+    if (i > 0) type = type.substring(0, i);
+    var filter = d3_selection_onFilters.get(type);
+    if (filter) type = filter, wrap = d3_selection_onFilter;
+    function onRemove() {
+      var l = this[name];
+      if (l) {
+        this.removeEventListener(type, l, l.$);
+        delete this[name];
+      }
+    }
+    function onAdd() {
+      var l = wrap(listener, d3_array(arguments));
+      onRemove.call(this);
+      this.addEventListener(type, this[name] = l, l.$ = capture);
+      l._ = listener;
+    }
+    function removeAll() {
+      var re = new RegExp("^__on([^.]+)" + d3.requote(type) + "$"), match;
+      for (var name in this) {
+        if (match = name.match(re)) {
+          var l = this[name];
+          this.removeEventListener(match[1], l, l.$);
+          delete this[name];
+        }
+      }
+    }
+    return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll;
+  }
+  var d3_selection_onFilters = d3.map({
+    mouseenter: "mouseover",
+    mouseleave: "mouseout"
+  });
+  d3_selection_onFilters.forEach(function(k) {
+    if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
+  });
+  function d3_selection_onListener(listener, argumentz) {
+    return function(e) {
+      var o = d3.event;
+      d3.event = e;
+      argumentz[0] = this.__data__;
+      try {
+        listener.apply(this, argumentz);
+      } finally {
+        d3.event = o;
+      }
+    };
+  }
+  function d3_selection_onFilter(listener, argumentz) {
+    var l = d3_selection_onListener(listener, argumentz);
+    return function(e) {
+      var target = this, related = e.relatedTarget;
+      if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) {
+        l.call(target, e);
+      }
+    };
+  }
+  var d3_event_dragSelect = d3_vendorSymbol(d3_documentElement.style, "userSelect"), d3_event_dragId = 0;
+  function d3_event_dragSuppress() {
+    var name = ".dragsuppress-" + ++d3_event_dragId, touchmove = "touchmove" + name, selectstart = "selectstart" + name, dragstart = "dragstart" + name, click = "click" + name, w = d3.select(d3_window).on(touchmove, d3_eventPreventDefault).on(selectstart, d3_eventPreventDefault).on(dragstart, d3_eventPreventDefault), style = d3_documentElement.style, select = style[d3_event_dragSelect];
+    style[d3_event_dragSelect] = "none";
+    return function(suppressClick) {
+      w.on(name, null);
+      style[d3_event_dragSelect] = select;
+      if (suppressClick) {
+        function off() {
+          w.on(click, null);
+        }
+        w.on(click, function() {
+          d3_eventPreventDefault();
+          off();
+        }, true);
+        setTimeout(off, 0);
+      }
+    };
+  }
+  d3.mouse = function(container) {
+    return d3_mousePoint(container, d3_eventSource());
+  };
+  var d3_mouse_bug44083 = /WebKit/.test(d3_window.navigator.userAgent) ? -1 : 0;
+  function d3_mousePoint(container, e) {
+    var svg = container.ownerSVGElement || container;
+    if (svg.createSVGPoint) {
+      var point = svg.createSVGPoint();
+      if (d3_mouse_bug44083 < 0 && (d3_window.scrollX || d3_window.scrollY)) {
+        svg = d3.select("body").append("svg").style({
+          position: "absolute",
+          top: 0,
+          left: 0,
+          margin: 0,
+          padding: 0,
+          border: "none"
+        }, "important");
+        var ctm = svg[0][0].getScreenCTM();
+        d3_mouse_bug44083 = !(ctm.f || ctm.e);
+        svg.remove();
+      }
+      if (d3_mouse_bug44083) {
+        point.x = e.pageX;
+        point.y = e.pageY;
+      } else {
+        point.x = e.clientX;
+        point.y = e.clientY;
+      }
+      point = point.matrixTransform(container.getScreenCTM().inverse());
+      return [ point.x, point.y ];
+    }
+    var rect = container.getBoundingClientRect();
+    return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
+  }
+  d3.touches = function(container, touches) {
+    if (arguments.length < 2) touches = d3_eventSource().touches;
+    return touches ? d3_array(touches).map(function(touch) {
+      var point = d3_mousePoint(container, touch);
+      point.identifier = touch.identifier;
+      return point;
+    }) : [];
+  };
+  d3.behavior.drag = function() {
+    var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, "mousemove", "mouseup"), touchstart = dragstart(touchid, touchposition, "touchmove", "touchend");
+    function drag() {
+      this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart);
+    }
+    function touchid() {
+      return d3.event.changedTouches[0].identifier;
+    }
+    function touchposition(parent, id) {
+      return d3.touches(parent).filter(function(p) {
+        return p.identifier === id;
+      })[0];
+    }
+    function dragstart(id, position, move, end) {
+      return function() {
+        var target = this, parent = target.parentNode, event_ = event.of(target, arguments), eventTarget = d3.event.target, eventId = id(), drag = eventId == null ? "drag" : "drag-" + eventId, origin_ = position(parent, eventId), dragged = 0, offset, w = d3.select(d3_window).on(move + "." + drag, moved).on(end + "." + drag, ended), dragRestore = d3_event_dragSuppress();
+        if (origin) {
+          offset = origin.apply(target, arguments);
+          offset = [ offset.x - origin_[0], offset.y - origin_[1] ];
+        } else {
+          offset = [ 0, 0 ];
+        }
+        event_({
+          type: "dragstart"
+        });
+        function moved() {
+          if (!parent) return ended();
+          var p = position(parent, eventId), dx = p[0] - origin_[0], dy = p[1] - origin_[1];
+          dragged |= dx | dy;
+          origin_ = p;
+          event_({
+            type: "drag",
+            x: p[0] + offset[0],
+            y: p[1] + offset[1],
+            dx: dx,
+            dy: dy
+          });
+        }
+        function ended() {
+          w.on(move + "." + drag, null).on(end + "." + drag, null);
+          dragRestore(dragged && d3.event.target === eventTarget);
+          event_({
+            type: "dragend"
+          });
+        }
+      };
+    }
+    drag.origin = function(x) {
+      if (!arguments.length) return origin;
+      origin = x;
+      return drag;
+    };
+    return d3.rebind(drag, event, "on");
+  };
+  d3.behavior.zoom = function() {
+    var translate = [ 0, 0 ], translate0, scale = 1, scaleExtent = d3_behavior_zoomInfinity, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", event = d3_eventDispatch(zoom, "zoom"), x0, x1, y0, y1, touchtime;
+    function zoom() {
+      this.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + ".zoom", mousewheeled).on(mousemove, mousewheelreset).on("dblclick.zoom", dblclicked).on("touchstart.zoom", touchstarted);
+    }
+    zoom.translate = function(x) {
+      if (!arguments.length) return translate;
+      translate = x.map(Number);
+      rescale();
+      return zoom;
+    };
+    zoom.scale = function(x) {
+      if (!arguments.length) return scale;
+      scale = +x;
+      rescale();
+      return zoom;
+    };
+    zoom.scaleExtent = function(x) {
+      if (!arguments.length) return scaleExtent;
+      scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number);
+      return zoom;
+    };
+    zoom.x = function(z) {
+      if (!arguments.length) return x1;
+      x1 = z;
+      x0 = z.copy();
+      translate = [ 0, 0 ];
+      scale = 1;
+      return zoom;
+    };
+    zoom.y = function(z) {
+      if (!arguments.length) return y1;
+      y1 = z;
+      y0 = z.copy();
+      translate = [ 0, 0 ];
+      scale = 1;
+      return zoom;
+    };
+    function location(p) {
+      return [ (p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale ];
+    }
+    function point(l) {
+      return [ l[0] * scale + translate[0], l[1] * scale + translate[1] ];
+    }
+    function scaleTo(s) {
+      scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
+    }
+    function translateTo(p, l) {
+      l = point(l);
+      translate[0] += p[0] - l[0];
+      translate[1] += p[1] - l[1];
+    }
+    function rescale() {
+      if (x1) x1.domain(x0.range().map(function(x) {
+        return (x - translate[0]) / scale;
+      }).map(x0.invert));
+      if (y1) y1.domain(y0.range().map(function(y) {
+        return (y - translate[1]) / scale;
+      }).map(y0.invert));
+    }
+    function dispatch(event) {
+      rescale();
+      event({
+        type: "zoom",
+        scale: scale,
+        translate: translate
+      });
+    }
+    function mousedowned() {
+      var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, dragged = 0, w = d3.select(d3_window).on(mousemove, moved).on(mouseup, ended), l = location(d3.mouse(target)), dragRestore = d3_event_dragSuppress();
+      function moved() {
+        dragged = 1;
+        translateTo(d3.mouse(target), l);
+        dispatch(event_);
+      }
+      function ended() {
+        w.on(mousemove, d3_window === target ? mousewheelreset : null).on(mouseup, null);
+        dragRestore(dragged && d3.event.target === eventTarget);
+      }
+    }
+    function touchstarted() {
+      var target = this, event_ = event.of(target, arguments), touches = d3.touches(target), locations = {}, distance0 = 0, scale0 = scale, now = Date.now(), name = "zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove." + name, touchend = "touchend." + name, w = d3.select(d3_window).on(touchmove, moved).on(touchend, ended), t = d3.select(target).on(mousedown, null), dragRestore = d3_event_dragSuppress();
+      touches.forEach(function(t) {
+        locations[t.identifier] = location(t);
+      });
+      if (touches.length === 1) {
+        if (now - touchtime < 500) {
+          var p = touches[0], l = location(touches[0]);
+          scaleTo(scale * 2);
+          translateTo(p, l);
+          d3_eventPreventDefault();
+          dispatch(event_);
+        }
+        touchtime = now;
+      } else if (touches.length > 1) {
+        var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1];
+        distance0 = dx * dx + dy * dy;
+      }
+      function moved() {
+        var touches = d3.touches(target), p0 = touches[0], l0 = locations[p0.identifier];
+        if (p1 = touches[1]) {
+          var p1, l1 = locations[p1.identifier], scale1 = d3.event.scale;
+          if (scale1 == null) {
+            var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1;
+            scale1 = distance0 && Math.sqrt(distance1 / distance0);
+          }
+          p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
+          l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
+          scaleTo(scale1 * scale0);
+        }
+        touchtime = null;
+        translateTo(p0, l0);
+        dispatch(event_);
+      }
+      function ended() {
+        w.on(touchmove, null).on(touchend, null);
+        t.on(mousedown, mousedowned);
+        dragRestore();
+      }
+    }
+    function mousewheeled() {
+      d3_eventPreventDefault();
+      if (!translate0) translate0 = location(d3.mouse(this));
+      scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale);
+      translateTo(d3.mouse(this), translate0);
+      dispatch(event.of(this, arguments));
+    }
+    function mousewheelreset() {
+      translate0 = null;
+    }
+    function dblclicked() {
+      var p = d3.mouse(this), l = location(p), k = Math.log(scale) / Math.LN2;
+      scaleTo(Math.pow(2, d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1));
+      translateTo(p, l);
+      dispatch(event.of(this, arguments));
+    }
+    return d3.rebind(zoom, event, "on");
+  };
+  var d3_behavior_zoomInfinity = [ 0, Infinity ];
+  var d3_behavior_zoomDelta, d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() {
+    return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);
+  }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() {
+    return d3.event.wheelDelta;
+  }, "mousewheel") : (d3_behavior_zoomDelta = function() {
+    return -d3.event.detail;
+  }, "MozMousePixelScroll");
+  function d3_Color() {}
+  d3_Color.prototype.toString = function() {
+    return this.rgb() + "";
+  };
+  d3.hsl = function(h, s, l) {
+    return arguments.length === 1 ? h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : d3_hsl(+h, +s, +l);
+  };
+  function d3_hsl(h, s, l) {
+    return new d3_Hsl(h, s, l);
+  }
+  function d3_Hsl(h, s, l) {
+    this.h = h;
+    this.s = s;
+    this.l = l;
+  }
+  var d3_hslPrototype = d3_Hsl.prototype = new d3_Color();
+  d3_hslPrototype.brighter = function(k) {
+    k = Math.pow(.7, arguments.length ? k : 1);
+    return d3_hsl(this.h, this.s, this.l / k);
+  };
+  d3_hslPrototype.darker = function(k) {
+    k = Math.pow(.7, arguments.length ? k : 1);
+    return d3_hsl(this.h, this.s, k * this.l);
+  };
+  d3_hslPrototype.rgb = function() {
+    return d3_hsl_rgb(this.h, this.s, this.l);
+  };
+  function d3_hsl_rgb(h, s, l) {
+    var m1, m2;
+    h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h;
+    s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s;
+    l = l < 0 ? 0 : l > 1 ? 1 : l;
+    m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
+    m1 = 2 * l - m2;
+    function v(h) {
+      if (h > 360) h -= 360; else if (h < 0) h += 360;
+      if (h < 60) return m1 + (m2 - m1) * h / 60;
+      if (h < 180) return m2;
+      if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
+      return m1;
+    }
+    function vv(h) {
+      return Math.round(v(h) * 255);
+    }
+    return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
+  }
+  var π = Math.PI, ε = 1e-6, ε2 = ε * ε, d3_radians = π / 180, d3_degrees = 180 / π;
+  function d3_sgn(x) {
+    return x > 0 ? 1 : x < 0 ? -1 : 0;
+  }
+  function d3_acos(x) {
+    return x > 1 ? 0 : x < -1 ? π : Math.acos(x);
+  }
+  function d3_asin(x) {
+    return x > 1 ? π / 2 : x < -1 ? -π / 2 : Math.asin(x);
+  }
+  function d3_sinh(x) {
+    return (Math.exp(x) - Math.exp(-x)) / 2;
+  }
+  function d3_cosh(x) {
+    return (Math.exp(x) + Math.exp(-x)) / 2;
+  }
+  function d3_haversin(x) {
+    return (x = Math.sin(x / 2)) * x;
+  }
+  d3.hcl = function(h, c, l) {
+    return arguments.length === 1 ? h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l) : h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : d3_hcl(+h, +c, +l);
+  };
+  function d3_hcl(h, c, l) {
+    return new d3_Hcl(h, c, l);
+  }
+  function d3_Hcl(h, c, l) {
+    this.h = h;
+    this.c = c;
+    this.l = l;
+  }
+  var d3_hclPrototype = d3_Hcl.prototype = new d3_Color();
+  d3_hclPrototype.brighter = function(k) {
+    return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
+  };
+  d3_hclPrototype.darker = function(k) {
+    return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
+  };
+  d3_hclPrototype.rgb = function() {
+    return d3_hcl_lab(this.h, this.c, this.l).rgb();
+  };
+  function d3_hcl_lab(h, c, l) {
+    if (isNaN(h)) h = 0;
+    if (isNaN(c)) c = 0;
+    return d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);
+  }
+  d3.lab = function(l, a, b) {
+    return arguments.length === 1 ? l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b) : l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h) : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b) : d3_lab(+l, +a, +b);
+  };
+  function d3_lab(l, a, b) {
+    return new d3_Lab(l, a, b);
+  }
+  function d3_Lab(l, a, b) {
+    this.l = l;
+    this.a = a;
+    this.b = b;
+  }
+  var d3_lab_K = 18;
+  var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
+  var d3_labPrototype = d3_Lab.prototype = new d3_Color();
+  d3_labPrototype.brighter = function(k) {
+    return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
+  };
+  d3_labPrototype.darker = function(k) {
+    return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
+  };
+  d3_labPrototype.rgb = function() {
+    return d3_lab_rgb(this.l, this.a, this.b);
+  };
+  function d3_lab_rgb(l, a, b) {
+    var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
+    x = d3_lab_xyz(x) * d3_lab_X;
+    y = d3_lab_xyz(y) * d3_lab_Y;
+    z = d3_lab_xyz(z) * d3_lab_Z;
+    return d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
+  }
+  function d3_lab_hcl(l, a, b) {
+    return l > 0 ? d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : d3_hcl(NaN, NaN, l);
+  }
+  function d3_lab_xyz(x) {
+    return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
+  }
+  function d3_xyz_lab(x) {
+    return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
+  }
+  function d3_xyz_rgb(r) {
+    return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
+  }
+  d3.rgb = function(r, g, b) {
+    return arguments.length === 1 ? r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : d3_rgb(~~r, ~~g, ~~b);
+  };
+  function d3_rgbNumber(value) {
+    return d3_rgb(value >> 16, value >> 8 & 255, value & 255);
+  }
+  function d3_rgbString(value) {
+    return d3_rgbNumber(value) + "";
+  }
+  function d3_rgb(r, g, b) {
+    return new d3_Rgb(r, g, b);
+  }
+  function d3_Rgb(r, g, b) {
+    this.r = r;
+    this.g = g;
+    this.b = b;
+  }
+  var d3_rgbPrototype = d3_Rgb.prototype = new d3_Color();
+  d3_rgbPrototype.brighter = function(k) {
+    k = Math.pow(.7, arguments.length ? k : 1);
+    var r = this.r, g = this.g, b = this.b, i = 30;
+    if (!r && !g && !b) return d3_rgb(i, i, i);
+    if (r && r < i) r = i;
+    if (g && g < i) g = i;
+    if (b && b < i) b = i;
+    return d3_rgb(Math.min(255, ~~(r / k)), Math.min(255, ~~(g / k)), Math.min(255, ~~(b / k)));
+  };
+  d3_rgbPrototype.darker = function(k) {
+    k = Math.pow(.7, arguments.length ? k : 1);
+    return d3_rgb(~~(k * this.r), ~~(k * this.g), ~~(k * this.b));
+  };
+  d3_rgbPrototype.hsl = function() {
+    return d3_rgb_hsl(this.r, this.g, this.b);
+  };
+  d3_rgbPrototype.toString = function() {
+    return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
+  };
+  function d3_rgb_hex(v) {
+    return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
+  }
+  function d3_rgb_parse(format, rgb, hsl) {
+    var r = 0, g = 0, b = 0, m1, m2, name;
+    m1 = /([a-z]+)\((.*)\)/i.exec(format);
+    if (m1) {
+      m2 = m1[2].split(",");
+      switch (m1[1]) {
+       case "hsl":
+        {
+          return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
+        }
+
+       case "rgb":
+        {
+          return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
+        }
+      }
+    }
+    if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b);
+    if (format != null && format.charAt(0) === "#") {
+      if (format.length === 4) {
+        r = format.charAt(1);
+        r += r;
+        g = format.charAt(2);
+        g += g;
+        b = format.charAt(3);
+        b += b;
+      } else if (format.length === 7) {
+        r = format.substring(1, 3);
+        g = format.substring(3, 5);
+        b = format.substring(5, 7);
+      }
+      r = parseInt(r, 16);
+      g = parseInt(g, 16);
+      b = parseInt(b, 16);
+    }
+    return rgb(r, g, b);
+  }
+  function d3_rgb_hsl(r, g, b) {
+    var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
+    if (d) {
+      s = l < .5 ? d / (max + min) : d / (2 - max - min);
+      if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
+      h *= 60;
+    } else {
+      h = NaN;
+      s = l > 0 && l < 1 ? 0 : h;
+    }
+    return d3_hsl(h, s, l);
+  }
+  function d3_rgb_lab(r, g, b) {
+    r = d3_rgb_xyz(r);
+    g = d3_rgb_xyz(g);
+    b = d3_rgb_xyz(b);
+    var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
+    return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
+  }
+  function d3_rgb_xyz(r) {
+    return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
+  }
+  function d3_rgb_parseNumber(c) {
+    var f = parseFloat(c);
+    return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
+  }
+  var d3_rgb_names = d3.map({
+    aliceblue: 15792383,
+    antiquewhite: 16444375,
+    aqua: 65535,
+    aquamarine: 8388564,
+    azure: 15794175,
+    beige: 16119260,
+    bisque: 16770244,
+    black: 0,
+    blanchedalmond: 16772045,
+    blue: 255,
+    blueviolet: 9055202,
+    brown: 10824234,
+    burlywood: 14596231,
+    cadetblue: 6266528,
+    chartreuse: 8388352,
+    chocolate: 13789470,
+    coral: 16744272,
+    cornflowerblue: 6591981,
+    cornsilk: 16775388,
+    crimson: 14423100,
+    cyan: 65535,
+    darkblue: 139,
+    darkcyan: 35723,
+    darkgoldenrod: 12092939,
+    darkgray: 11119017,
+    darkgreen: 25600,
+    darkgrey: 11119017,
+    darkkhaki: 12433259,
+    darkmagenta: 9109643,
+    darkolivegreen: 5597999,
+    darkorange: 16747520,
+    darkorchid: 10040012,
+    darkred: 9109504,
+    darksalmon: 15308410,
+    darkseagreen: 9419919,
+    darkslateblue: 4734347,
+    darkslategray: 3100495,
+    darkslategrey: 3100495,
+    darkturquoise: 52945,
+    darkviolet: 9699539,
+    deeppink: 16716947,
+    deepskyblue: 49151,
+    dimgray: 6908265,
+    dimgrey: 6908265,
+    dodgerblue: 2003199,
+    firebrick: 11674146,
+    floralwhite: 16775920,
+    forestgreen: 2263842,
+    fuchsia: 16711935,
+    gainsboro: 14474460,
+    ghostwhite: 16316671,
+    gold: 16766720,
+    goldenrod: 14329120,
+    gray: 8421504,
+    green: 32768,
+    greenyellow: 11403055,
+    grey: 8421504,
+    honeydew: 15794160,
+    hotpink: 16738740,
+    indianred: 13458524,
+    indigo: 4915330,
+    ivory: 16777200,
+    khaki: 15787660,
+    lavender: 15132410,
+    lavenderblush: 16773365,
+    lawngreen: 8190976,
+    lemonchiffon: 16775885,
+    lightblue: 11393254,
+    lightcoral: 15761536,
+    lightcyan: 14745599,
+    lightgoldenrodyellow: 16448210,
+    lightgray: 13882323,
+    lightgreen: 9498256,
+    lightgrey: 13882323,
+    lightpink: 16758465,
+    lightsalmon: 16752762,
+    lightseagreen: 2142890,
+    lightskyblue: 8900346,
+    lightslategray: 7833753,
+    lightslategrey: 7833753,
+    lightsteelblue: 11584734,
+    lightyellow: 16777184,
+    lime: 65280,
+    limegreen: 3329330,
+    linen: 16445670,
+    magenta: 16711935,
+    maroon: 8388608,
+    mediumaquamarine: 6737322,
+    mediumblue: 205,
+    mediumorchid: 12211667,
+    mediumpurple: 9662683,
+    mediumseagreen: 3978097,
+    mediumslateblue: 8087790,
+    mediumspringgreen: 64154,
+    mediumturquoise: 4772300,
+    mediumvioletred: 13047173,
+    midnightblue: 1644912,
+    mintcream: 16121850,
+    mistyrose: 16770273,
+    moccasin: 16770229,
+    navajowhite: 16768685,
+    navy: 128,
+    oldlace: 16643558,
+    olive: 8421376,
+    olivedrab: 7048739,
+    orange: 16753920,
+    orangered: 16729344,
+    orchid: 14315734,
+    palegoldenrod: 15657130,
+    palegreen: 10025880,
+    paleturquoise: 11529966,
+    palevioletred: 14381203,
+    papayawhip: 16773077,
+    peachpuff: 16767673,
+    peru: 13468991,
+    pink: 16761035,
+    plum: 14524637,
+    powderblue: 11591910,
+    purple: 8388736,
+    red: 16711680,
+    rosybrown: 12357519,
+    royalblue: 4286945,
+    saddlebrown: 9127187,
+    salmon: 16416882,
+    sandybrown: 16032864,
+    seagreen: 3050327,
+    seashell: 16774638,
+    sienna: 10506797,
+    silver: 12632256,
+    skyblue: 8900331,
+    slateblue: 6970061,
+    slategray: 7372944,
+    slategrey: 7372944,
+    snow: 16775930,
+    springgreen: 65407,
+    steelblue: 4620980,
+    tan: 13808780,
+    teal: 32896,
+    thistle: 14204888,
+    tomato: 16737095,
+    turquoise: 4251856,
+    violet: 15631086,
+    wheat: 16113331,
+    white: 16777215,
+    whitesmoke: 16119285,
+    yellow: 16776960,
+    yellowgreen: 10145074
+  });
+  d3_rgb_names.forEach(function(key, value) {
+    d3_rgb_names.set(key, d3_rgbNumber(value));
+  });
+  function d3_functor(v) {
+    return typeof v === "function" ? v : function() {
+      return v;
+    };
+  }
+  d3.functor = d3_functor;
+  function d3_identity(d) {
+    return d;
+  }
+  d3.xhr = d3_xhrType(d3_identity);
+  function d3_xhrType(response) {
+    return function(url, mimeType, callback) {
+      if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType,
+      mimeType = null;
+      return d3_xhr(url, mimeType, response, callback);
+    };
+  }
+  function d3_xhr(url, mimeType, response, callback) {
+    var xhr = {}, dispatch = d3.dispatch("progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null;
+    if (d3_window.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest();
+    "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {
+      request.readyState > 3 && respond();
+    };
+    function respond() {
+      var status = request.status, result;
+      if (!status && request.responseText || status >= 200 && status < 300 || status === 304) {
+        try {
+          result = response.call(xhr, request);
+        } catch (e) {
+          dispatch.error.call(xhr, e);
+          return;
+        }
+        dispatch.load.call(xhr, result);
+      } else {
+        dispatch.error.call(xhr, request);
+      }
+    }
+    request.onprogress = function(event) {
+      var o = d3.event;
+      d3.event = event;
+      try {
+        dispatch.progress.call(xhr, request);
+      } finally {
+        d3.event = o;
+      }
+    };
+    xhr.header = function(name, value) {
+      name = (name + "").toLowerCase();
+      if (arguments.length < 2) return headers[name];
+      if (value == null) delete headers[name]; else headers[name] = value + "";
+      return xhr;
+    };
+    xhr.mimeType = function(value) {
+      if (!arguments.length) return mimeType;
+      mimeType = value == null ? null : value + "";
+      return xhr;
+    };
+    xhr.responseType = function(value) {
+      if (!arguments.length) return responseType;
+      responseType = value;
+      return xhr;
+    };
+    xhr.response = function(value) {
+      response = value;
+      return xhr;
+    };
+    [ "get", "post" ].forEach(function(method) {
+      xhr[method] = function() {
+        return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments)));
+      };
+    });
+    xhr.send = function(method, data, callback) {
+      if (arguments.length === 2 && typeof data === "function") callback = data, data = null;
+      request.open(method, url, true);
+      if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*";
+      if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]);
+      if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType);
+      if (responseType != null) request.responseType = responseType;
+      if (callback != null) xhr.on("error", callback).on("load", function(request) {
+        callback(null, request);
+      });
+      request.send(data == null ? null : data);
+      return xhr;
+    };
+    xhr.abort = function() {
+      request.abort();
+      return xhr;
+    };
+    d3.rebind(xhr, dispatch, "on");
+    return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback));
+  }
+  function d3_xhr_fixCallback(callback) {
+    return callback.length === 1 ? function(error, request) {
+      callback(error == null ? request : null);
+    } : callback;
+  }
+  d3.dsv = function(delimiter, mimeType) {
+    var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
+    function dsv(url, row, callback) {
+      if (arguments.length < 3) callback = row, row = null;
+      var xhr = d3.xhr(url, mimeType, callback);
+      xhr.row = function(_) {
+        return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row;
+      };
+      return xhr.row(row);
+    }
+    function response(request) {
+      return dsv.parse(request.responseText);
+    }
+    function typedResponse(f) {
+      return function(request) {
+        return dsv.parse(request.responseText, f);
+      };
+    }
+    dsv.parse = function(text, f) {
+      var o;
+      return dsv.parseRows(text, function(row, i) {
+        if (o) return o(row, i - 1);
+        var a = new Function("d", "return {" + row.map(function(name, i) {
+          return JSON.stringify(name) + ": d[" + i + "]";
+        }).join(",") + "}");
+        o = f ? function(row, i) {
+          return f(a(row), i);
+        } : a;
+      });
+    };
+    dsv.parseRows = function(text, f) {
+      var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
+      function token() {
+        if (I >= N) return EOF;
+        if (eol) return eol = false, EOL;
+        var j = I;
+        if (text.charCodeAt(j) === 34) {
+          var i = j;
+          while (i++ < N) {
+            if (text.charCodeAt(i) === 34) {
+              if (text.charCodeAt(i + 1) !== 34) break;
+              ++i;
+            }
+          }
+          I = i + 2;
+          var c = text.charCodeAt(i + 1);
+          if (c === 13) {
+            eol = true;
+            if (text.charCodeAt(i + 2) === 10) ++I;
+          } else if (c === 10) {
+            eol = true;
+          }
+          return text.substring(j + 1, i).replace(/""/g, '"');
+        }
+        while (I < N) {
+          var c = text.charCodeAt(I++), k = 1;
+          if (c === 10) eol = true; else if (c === 13) {
+            eol = true;
+            if (text.charCodeAt(I) === 10) ++I, ++k;
+          } else if (c !== delimiterCode) continue;
+          return text.substring(j, I - k);
+        }
+        return text.substring(j);
+      }
+      while ((t = token()) !== EOF) {
+        var a = [];
+        while (t !== EOL && t !== EOF) {
+          a.push(t);
+          t = token();
+        }
+        if (f && !(a = f(a, n++))) continue;
+        rows.push(a);
+      }
+      return rows;
+    };
+    dsv.format = function(rows) {
+      if (Array.isArray(rows[0])) return dsv.formatRows(rows);
+      var fieldSet = new d3_Set(), fields = [];
+      rows.forEach(function(row) {
+        for (var field in row) {
+          if (!fieldSet.has(field)) {
+            fields.push(fieldSet.add(field));
+          }
+        }
+      });
+      return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) {
+        return fields.map(function(field) {
+          return formatValue(row[field]);
+        }).join(delimiter);
+      })).join("\n");
+    };
+    dsv.formatRows = function(rows) {
+      return rows.map(formatRow).join("\n");
+    };
+    function formatRow(row) {
+      return row.map(formatValue).join(delimiter);
+    }
+    function formatValue(text) {
+      return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
+    }
+    return dsv;
+  };
+  d3.csv = d3.dsv(",", "text/csv");
+  d3.tsv = d3.dsv("	", "text/tab-separated-values");
+  var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_active, d3_timer_frame = d3_window[d3_vendorSymbol(d3_window, "requestAnimationFrame")] || function(callback) {
+    setTimeout(callback, 17);
+  };
+  d3.timer = function(callback, delay, then) {
+    var n = arguments.length;
+    if (n < 2) delay = 0;
+    if (n < 3) then = Date.now();
+    var time = then + delay, timer = {
+      callback: callback,
+      time: time,
+      next: null
+    };
+    if (d3_timer_queueTail) d3_timer_queueTail.next = timer; else d3_timer_queueHead = timer;
+    d3_timer_queueTail = timer;
+    if (!d3_timer_interval) {
+      d3_timer_timeout = clearTimeout(d3_timer_timeout);
+      d3_timer_interval = 1;
+      d3_timer_frame(d3_timer_step);
+    }
+  };
+  function d3_timer_step() {
+    var now = d3_timer_mark(), delay = d3_timer_sweep() - now;
+    if (delay > 24) {
+      if (isFinite(delay)) {
+        clearTimeout(d3_timer_timeout);
+        d3_timer_timeout = setTimeout(d3_timer_step, delay);
+      }
+      d3_timer_interval = 0;
+    } else {
+      d3_timer_interval = 1;
+      d3_timer_frame(d3_timer_step);
+    }
+  }
+  d3.timer.flush = function() {
+    d3_timer_mark();
+    d3_timer_sweep();
+  };
+  function d3_timer_replace(callback, delay, then) {
+    var n = arguments.length;
+    if (n < 2) delay = 0;
+    if (n < 3) then = Date.now();
+    d3_timer_active.callback = callback;
+    d3_timer_active.time = then + delay;
+  }
+  function d3_timer_mark() {
+    var now = Date.now();
+    d3_timer_active = d3_timer_queueHead;
+    while (d3_timer_active) {
+      if (now >= d3_timer_active.time) d3_timer_active.flush = d3_timer_active.callback(now - d3_timer_active.time);
+      d3_timer_active = d3_timer_active.next;
+    }
+    return now;
+  }
+  function d3_timer_sweep() {
+    var t0, t1 = d3_timer_queueHead, time = Infinity;
+    while (t1) {
+      if (t1.flush) {
+        t1 = t0 ? t0.next = t1.next : d3_timer_queueHead = t1.next;
+      } else {
+        if (t1.time < time) time = t1.time;
+        t1 = (t0 = t1).next;
+      }
+    }
+    d3_timer_queueTail = t0;
+    return time;
+  }
+  var d3_format_decimalPoint = ".", d3_format_thousandsSeparator = ",", d3_format_grouping = [ 3, 3 ], d3_format_currencySymbol = "$";
+  var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
+  d3.formatPrefix = function(value, precision) {
+    var i = 0;
+    if (value) {
+      if (value < 0) value *= -1;
+      if (precision) value = d3.round(value, d3_format_precision(value, precision));
+      i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
+      i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3));
+    }
+    return d3_formatPrefixes[8 + i / 3];
+  };
+  function d3_formatPrefix(d, i) {
+    var k = Math.pow(10, Math.abs(8 - i) * 3);
+    return {
+      scale: i > 8 ? function(d) {
+        return d / k;
+      } : function(d) {
+        return d * k;
+      },
+      symbol: d
+    };
+  }
+  d3.round = function(x, n) {
+    return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
+  };
+  d3.format = function(specifier) {
+    var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "", symbol = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false;
+    if (precision) precision = +precision.substring(1);
+    if (zfill || fill === "0" && align === "=") {
+      zfill = fill = "0";
+      align = "=";
+      if (comma) width -= Math.floor((width - 1) / 4);
+    }
+    switch (type) {
+     case "n":
+      comma = true;
+      type = "g";
+      break;
+
+     case "%":
+      scale = 100;
+      suffix = "%";
+      type = "f";
+      break;
+
+     case "p":
+      scale = 100;
+      suffix = "%";
+      type = "r";
+      break;
+
+     case "b":
+     case "o":
+     case "x":
+     case "X":
+      if (symbol === "#") symbol = "0" + type.toLowerCase();
+
+     case "c":
+     case "d":
+      integer = true;
+      precision = 0;
+      break;
+
+     case "s":
+      scale = -1;
+      type = "r";
+      break;
+    }
+    if (symbol === "#") symbol = ""; else if (symbol === "$") symbol = d3_format_currencySymbol;
+    if (type == "r" && !precision) type = "g";
+    if (precision != null) {
+      if (type == "g") precision = Math.max(1, Math.min(21, precision)); else if (type == "e" || type == "f") precision = Math.max(0, Math.min(20, precision));
+    }
+    type = d3_format_types.get(type) || d3_format_typeDefault;
+    var zcomma = zfill && comma;
+    return function(value) {
+      if (integer && value % 1) return "";
+      var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign;
+      if (scale < 0) {
+        var prefix = d3.formatPrefix(value, precision);
+        value = prefix.scale(value);
+        suffix = prefix.symbol;
+      } else {
+        value *= scale;
+      }
+      value = type(value, precision);
+      var i = value.lastIndexOf("."), before = i < 0 ? value : value.substring(0, i), after = i < 0 ? "" : d3_format_decimalPoint + value.substring(i + 1);
+      if (!zfill && comma) before = d3_format_group(before);
+      var length = symbol.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : "";
+      if (zcomma) before = d3_format_group(padding + before);
+      negative += symbol;
+      value = before + after;
+      return (align === "<" ? negative + value + padding : align === ">" ? padding + negative + value : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + suffix;
+    };
+  };
+  var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;
+  var d3_format_types = d3.map({
+    b: function(x) {
+      return x.toString(2);
+    },
+    c: function(x) {
+      return String.fromCharCode(x);
+    },
+    o: function(x) {
+      return x.toString(8);
+    },
+    x: function(x) {
+      return x.toString(16);
+    },
+    X: function(x) {
+      return x.toString(16).toUpperCase();
+    },
+    g: function(x, p) {
+      return x.toPrecision(p);
+    },
+    e: function(x, p) {
+      return x.toExponential(p);
+    },
+    f: function(x, p) {
+      return x.toFixed(p);
+    },
+    r: function(x, p) {
+      return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p))));
+    }
+  });
+  function d3_format_precision(x, p) {
+    return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1);
+  }
+  function d3_format_typeDefault(x) {
+    return x + "";
+  }
+  var d3_format_group = d3_identity;
+  if (d3_format_grouping) {
+    var d3_format_groupingLength = d3_format_grouping.length;
+    d3_format_group = function(value) {
+      var i = value.length, t = [], j = 0, g = d3_format_grouping[0];
+      while (i > 0 && g > 0) {
+        t.push(value.substring(i -= g, i + g));
+        g = d3_format_grouping[j = (j + 1) % d3_format_groupingLength];
+      }
+      return t.reverse().join(d3_format_thousandsSeparator);
+    };
+  }
+  d3.geo = {};
+  function d3_adder() {}
+  d3_adder.prototype = {
+    s: 0,
+    t: 0,
+    add: function(y) {
+      d3_adderSum(y, this.t, d3_adderTemp);
+      d3_adderSum(d3_adderTemp.s, this.s, this);
+      if (this.s) this.t += d3_adderTemp.t; else this.s = d3_adderTemp.t;
+    },
+    reset: function() {
+      this.s = this.t = 0;
+    },
+    valueOf: function() {
+      return this.s;
+    }
+  };
+  var d3_adderTemp = new d3_adder();
+  function d3_adderSum(a, b, o) {
+    var x = o.s = a + b, bv = x - a, av = x - bv;
+    o.t = a - av + (b - bv);
+  }
+  d3.geo.stream = function(object, listener) {
+    if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) {
+      d3_geo_streamObjectType[object.type](object, listener);
+    } else {
+      d3_geo_streamGeometry(object, listener);
+    }
+  };
+  function d3_geo_streamGeometry(geometry, listener) {
+    if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) {
+      d3_geo_streamGeometryType[geometry.type](geometry, listener);
+    }
+  }
+  var d3_geo_streamObjectType = {
+    Feature: function(feature, listener) {
+      d3_geo_streamGeometry(feature.geometry, listener);
+    },
+    FeatureCollection: function(object, listener) {
+      var features = object.features, i = -1, n = features.length;
+      while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener);
+    }
+  };
+  var d3_geo_streamGeometryType = {
+    Sphere: function(object, listener) {
+      listener.sphere();
+    },
+    Point: function(object, listener) {
+      var coordinate = object.coordinates;
+      listener.point(coordinate[0], coordinate[1]);
+    },
+    MultiPoint: function(object, listener) {
+      var coordinates = object.coordinates, i = -1, n = coordinates.length, coordinate;
+      while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1]);
+    },
+    LineString: function(object, listener) {
+      d3_geo_streamLine(object.coordinates, listener, 0);
+    },
+    MultiLineString: function(object, listener) {
+      var coordinates = object.coordinates, i = -1, n = coordinates.length;
+      while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0);
+    },
+    Polygon: function(object, listener) {
+      d3_geo_streamPolygon(object.coordinates, listener);
+    },
+    MultiPolygon: function(object, listener) {
+      var coordinates = object.coordinates, i = -1, n = coordinates.length;
+      while (++i < n) d3_geo_streamPolygon(coordinates[i], listener);
+    },
+    GeometryCollection: function(object, listener) {
+      var geometries = object.geometries, i = -1, n = geometries.length;
+      while (++i < n) d3_geo_streamGeometry(geometries[i], listener);
+    }
+  };
+  function d3_geo_streamLine(coordinates, listener, closed) {
+    var i = -1, n = coordinates.length - closed, coordinate;
+    listener.lineStart();
+    while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1]);
+    listener.lineEnd();
+  }
+  function d3_geo_streamPolygon(coordinates, listener) {
+    var i = -1, n = coordinates.length;
+    listener.polygonStart();
+    while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1);
+    listener.polygonEnd();
+  }
+  d3.geo.area = function(object) {
+    d3_geo_areaSum = 0;
+    d3.geo.stream(object, d3_geo_area);
+    return d3_geo_areaSum;
+  };
+  var d3_geo_areaSum, d3_geo_areaRingSum = new d3_adder();
+  var d3_geo_area = {
+    sphere: function() {
+      d3_geo_areaSum += 4 * π;
+    },
+    point: d3_noop,
+    lineStart: d3_noop,
+    lineEnd: d3_noop,
+    polygonStart: function() {
+      d3_geo_areaRingSum.reset();
+      d3_geo_area.lineStart = d3_geo_areaRingStart;
+    },
+    polygonEnd: function() {
+      var area = 2 * d3_geo_areaRingSum;
+      d3_geo_areaSum += area < 0 ? 4 * π + area : area;
+      d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop;
+    }
+  };
+  function d3_geo_areaRingStart() {
+    var λ00, φ00, λ0, cosφ0, sinφ0;
+    d3_geo_area.point = function(λ, φ) {
+      d3_geo_area.point = nextPoint;
+      λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4),
+      sinφ0 = Math.sin(φ);
+    };
+    function nextPoint(λ, φ) {
+      λ *= d3_radians;
+      φ = φ * d3_radians / 2 + π / 4;
+      var dλ = λ - λ0, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u = cosφ0 * cosφ + k * Math.cos(dλ), v = k * Math.sin(dλ);
+      d3_geo_areaRingSum.add(Math.atan2(v, u));
+      λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;
+    }
+    d3_geo_area.lineEnd = function() {
+      nextPoint(λ00, φ00);
+    };
+  }
+  function d3_geo_cartesian(spherical) {
+    var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ);
+    return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ];
+  }
+  function d3_geo_cartesianDot(a, b) {
+    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+  }
+  function d3_geo_cartesianCross(a, b) {
+    return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ];
+  }
+  function d3_geo_cartesianAdd(a, b) {
+    a[0] += b[0];
+    a[1] += b[1];
+    a[2] += b[2];
+  }
+  function d3_geo_cartesianScale(vector, k) {
+    return [ vector[0] * k, vector[1] * k, vector[2] * k ];
+  }
+  function d3_geo_cartesianNormalize(d) {
+    var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
+    d[0] /= l;
+    d[1] /= l;
+    d[2] /= l;
+  }
+  function d3_geo_spherical(cartesian) {
+    return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ];
+  }
+  function d3_geo_sphericalEqual(a, b) {
+    return Math.abs(a[0] - b[0]) < ε && Math.abs(a[1] - b[1]) < ε;
+  }
+  d3.geo.bounds = function() {
+    var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;
+    var bound = {
+      point: point,
+      lineStart: lineStart,
+      lineEnd: lineEnd,
+      polygonStart: function() {
+        bound.point = ringPoint;
+        bound.lineStart = ringStart;
+        bound.lineEnd = ringEnd;
+        dλSum = 0;
+        d3_geo_area.polygonStart();
+      },
+      polygonEnd: function() {
+        d3_geo_area.polygonEnd();
+        bound.point = point;
+        bound.lineStart = lineStart;
+        bound.lineEnd = lineEnd;
+        if (d3_geo_areaRingSum < 0) λ0 = -(λ1 = 180), φ0 = -(φ1 = 90); else if (dλSum > ε) φ1 = 90; else if (dλSum < -ε) φ0 = -90;
+        range[0] = λ0, range[1] = λ1;
+      }
+    };
+    function point(λ, φ) {
+      ranges.push(range = [ λ0 = λ, λ1 = λ ]);
+      if (φ < φ0) φ0 = φ;
+      if (φ > φ1) φ1 = φ;
+    }
+    function linePoint(λ, φ) {
+      var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]);
+      if (p0) {
+        var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal);
+        d3_geo_cartesianNormalize(inflection);
+        inflection = d3_geo_spherical(inflection);
+        var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, antimeridian = Math.abs(dλ) > 180;
+        if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) {
+          var φi = inflection[1] * d3_degrees;
+          if (φi > φ1) φ1 = φi;
+        } else if (λi = (λi + 360) % 360 - 180, antimeridian ^ (s * λ_ < λi && λi < s * λ)) {
+          var φi = -inflection[1] * d3_degrees;
+          if (φi < φ0) φ0 = φi;
+        } else {
+          if (φ < φ0) φ0 = φ;
+          if (φ > φ1) φ1 = φ;
+        }
+        if (antimeridian) {
+          if (λ < λ_) {
+            if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;
+          } else {
+            if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;
+          }
+        } else {
+          if (λ1 >= λ0) {
+            if (λ < λ0) λ0 = λ;
+            if (λ > λ1) λ1 = λ;
+          } else {
+            if (λ > λ_) {
+              if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;
+            } else {
+              if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;
+            }
+          }
+        }
+      } else {
+        point(λ, φ);
+      }
+      p0 = p, λ_ = λ;
+    }
+    function lineStart() {
+      bound.point = linePoint;
+    }
+    function lineEnd() {
+      range[0] = λ0, range[1] = λ1;
+      bound.point = point;
+      p0 = null;
+    }
+    function ringPoint(λ, φ) {
+      if (p0) {
+        var dλ = λ - λ_;
+        dλSum += Math.abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ;
+      } else λ__ = λ, φ__ = φ;
+      d3_geo_area.point(λ, φ);
+      linePoint(λ, φ);
+    }
+    function ringStart() {
+      d3_geo_area.lineStart();
+    }
+    function ringEnd() {
+      ringPoint(λ__, φ__);
+      d3_geo_area.lineEnd();
+      if (Math.abs(dλSum) > ε) λ0 = -(λ1 = 180);
+      range[0] = λ0, range[1] = λ1;
+      p0 = null;
+    }
+    function angle(λ0, λ1) {
+      return (λ1 -= λ0) < 0 ? λ1 + 360 : λ1;
+    }
+    function compareRanges(a, b) {
+      return a[0] - b[0];
+    }
+    function withinRange(x, range) {
+      return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;
+    }
+    return function(feature) {
+      φ1 = λ1 = -(λ0 = φ0 = Infinity);
+      ranges = [];
+      d3.geo.stream(feature, bound);
+      var n = ranges.length;
+      if (n) {
+        ranges.sort(compareRanges);
+        for (var i = 1, a = ranges[0], b, merged = [ a ]; i < n; ++i) {
+          b = ranges[i];
+          if (withinRange(b[0], a) || withinRange(b[1], a)) {
+            if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];
+            if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];
+          } else {
+            merged.push(a = b);
+          }
+        }
+        var best = -Infinity, dλ;
+        for (var n = merged.length - 1, i = 0, a = merged[n], b; i <= n; a = b, ++i) {
+          b = merged[i];
+          if ((dλ = angle(a[1], b[0])) > best) best = dλ, λ0 = b[0], λ1 = a[1];
+        }
+      }
+      ranges = range = null;
+      return λ0 === Infinity || φ0 === Infinity ? [ [ NaN, NaN ], [ NaN, NaN ] ] : [ [ λ0, φ0 ], [ λ1, φ1 ] ];
+    };
+  }();
+  d3.geo.centroid = function(object) {
+    d3_geo_centroidW0 = d3_geo_centroidW1 = d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;
+    d3.geo.stream(object, d3_geo_centroid);
+    var x = d3_geo_centroidX2, y = d3_geo_centroidY2, z = d3_geo_centroidZ2, m = x * x + y * y + z * z;
+    if (m < ε2) {
+      x = d3_geo_centroidX1, y = d3_geo_centroidY1, z = d3_geo_centroidZ1;
+      if (d3_geo_centroidW1 < ε) x = d3_geo_centroidX0, y = d3_geo_centroidY0, z = d3_geo_centroidZ0;
+      m = x * x + y * y + z * z;
+      if (m < ε2) return [ NaN, NaN ];
+    }
+    return [ Math.atan2(y, x) * d3_degrees, d3_asin(z / Math.sqrt(m)) * d3_degrees ];
+  };
+  var d3_geo_centroidW0, d3_geo_centroidW1, d3_geo_centroidX0, d3_geo_centroidY0, d3_geo_centroidZ0, d3_geo_centroidX1, d3_geo_centroidY1, d3_geo_centroidZ1, d3_geo_centroidX2, d3_geo_centroidY2, d3_geo_centroidZ2;
+  var d3_geo_centroid = {
+    sphere: d3_noop,
+    point: d3_geo_centroidPoint,
+    lineStart: d3_geo_centroidLineStart,
+    lineEnd: d3_geo_centroidLineEnd,
+    polygonStart: function() {
+      d3_geo_centroid.lineStart = d3_geo_centroidRingStart;
+    },
+    polygonEnd: function() {
+      d3_geo_centroid.lineStart = d3_geo_centroidLineStart;
+    }
+  };
+  function d3_geo_centroidPoint(λ, φ) {
+    λ *= d3_radians;
+    var cosφ = Math.cos(φ *= d3_radians);
+    d3_geo_centroidPointXYZ(cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ));
+  }
+  function d3_geo_centroidPointXYZ(x, y, z) {
+    ++d3_geo_centroidW0;
+    d3_geo_centroidX0 += (x - d3_geo_centroidX0) / d3_geo_centroidW0;
+    d3_geo_centroidY0 += (y - d3_geo_centroidY0) / d3_geo_centroidW0;
+    d3_geo_centroidZ0 += (z - d3_geo_centroidZ0) / d3_geo_centroidW0;
+  }
+  function d3_geo_centroidLineStart() {
+    var x0, y0, z0;
+    d3_geo_centroid.point = function(λ, φ) {
+      λ *= d3_radians;
+      var cosφ = Math.cos(φ *= d3_radians);
+      x0 = cosφ * Math.cos(λ);
+      y0 = cosφ * Math.sin(λ);
+      z0 = Math.sin(φ);
+      d3_geo_centroid.point = nextPoint;
+      d3_geo_centroidPointXYZ(x0, y0, z0);
+    };
+    function nextPoint(λ, φ) {
+      λ *= d3_radians;
+      var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);
+      d3_geo_centroidW1 += w;
+      d3_geo_centroidX1 += w * (x0 + (x0 = x));
+      d3_geo_centroidY1 += w * (y0 + (y0 = y));
+      d3_geo_centroidZ1 += w * (z0 + (z0 = z));
+      d3_geo_centroidPointXYZ(x0, y0, z0);
+    }
+  }
+  function d3_geo_centroidLineEnd() {
+    d3_geo_centroid.point = d3_geo_centroidPoint;
+  }
+  function d3_geo_centroidRingStart() {
+    var λ00, φ00, x0, y0, z0;
+    d3_geo_centroid.point = function(λ, φ) {
+      λ00 = λ, φ00 = φ;
+      d3_geo_centroid.point = nextPoint;
+      λ *= d3_radians;
+      var cosφ = Math.cos(φ *= d3_radians);
+      x0 = cosφ * Math.cos(λ);
+      y0 = cosφ * Math.sin(λ);
+      z0 = Math.sin(φ);
+      d3_geo_centroidPointXYZ(x0, y0, z0);
+    };
+    d3_geo_centroid.lineEnd = function() {
+      nextPoint(λ00, φ00);
+      d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd;
+      d3_geo_centroid.point = d3_geo_centroidPoint;
+    };
+    function nextPoint(λ, φ) {
+      λ *= d3_radians;
+      var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Math.sqrt(cx * cx + cy * cy + cz * cz), u = x0 * x + y0 * y + z0 * z, v = m && -d3_acos(u) / m, w = Math.atan2(m, u);
+      d3_geo_centroidX2 += v * cx;
+      d3_geo_centroidY2 += v * cy;
+      d3_geo_centroidZ2 += v * cz;
+      d3_geo_centroidW1 += w;
+      d3_geo_centroidX1 += w * (x0 + (x0 = x));
+      d3_geo_centroidY1 += w * (y0 + (y0 = y));
+      d3_geo_centroidZ1 += w * (z0 + (z0 = z));
+      d3_geo_centroidPointXYZ(x0, y0, z0);
+    }
+  }
+  function d3_true() {
+    return true;
+  }
+  function d3_geo_clipPolygon(segments, compare, inside, interpolate, listener) {
+    var subject = [], clip = [];
+    segments.forEach(function(segment) {
+      if ((n = segment.length - 1) <= 0) return;
+      var n, p0 = segment[0], p1 = segment[n];
+      if (d3_geo_sphericalEqual(p0, p1)) {
+        listener.lineStart();
+        for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]);
+        listener.lineEnd();
+        return;
+      }
+      var a = {
+        point: p0,
+        points: segment,
+        other: null,
+        visited: false,
+        entry: true,
+        subject: true
+      }, b = {
+        point: p0,
+        points: [ p0 ],
+        other: a,
+        visited: false,
+        entry: false,
+        subject: false
+      };
+      a.other = b;
+      subject.push(a);
+      clip.push(b);
+      a = {
+        point: p1,
+        points: [ p1 ],
+        other: null,
+        visited: false,
+        entry: false,
+        subject: true
+      };
+      b = {
+        point: p1,
+        points: [ p1 ],
+        other: a,
+        visited: false,
+        entry: true,
+        subject: false
+      };
+      a.other = b;
+      subject.push(a);
+      clip.push(b);
+    });
+    clip.sort(compare);
+    d3_geo_clipPolygonLinkCircular(subject);
+    d3_geo_clipPolygonLinkCircular(clip);
+    if (!subject.length) return;
+    if (inside) for (var i = 1, e = !inside(clip[0].point), n = clip.length; i < n; ++i) {
+      clip[i].entry = e = !e;
+    }
+    var start = subject[0], current, points, point;
+    while (1) {
+      current = start;
+      while (current.visited) if ((current = current.next) === start) return;
+      points = current.points;
+      listener.lineStart();
+      do {
+        current.visited = current.other.visited = true;
+        if (current.entry) {
+          if (current.subject) {
+            for (var i = 0; i < points.length; i++) listener.point((point = points[i])[0], point[1]);
+          } else {
+            interpolate(current.point, current.next.point, 1, listener);
+          }
+          current = current.next;
+        } else {
+          if (current.subject) {
+            points = current.prev.points;
+            for (var i = points.length; --i >= 0; ) listener.point((point = points[i])[0], point[1]);
+          } else {
+            interpolate(current.point, current.prev.point, -1, listener);
+          }
+          current = current.prev;
+        }
+        current = current.other;
+        points = current.points;
+      } while (!current.visited);
+      listener.lineEnd();
+    }
+  }
+  function d3_geo_clipPolygonLinkCircular(array) {
+    if (!(n = array.length)) return;
+    var n, i = 0, a = array[0], b;
+    while (++i < n) {
+      a.next = b = array[i];
+      b.prev = a;
+      a = b;
+    }
+    a.next = b = array[0];
+    b.prev = a;
+  }
+  function d3_geo_clip(pointVisible, clipLine, interpolate, polygonContains) {
+    return function(listener) {
+      var line = clipLine(listener);
+      var clip = {
+        point: point,
+        lineStart: lineStart,
+        lineEnd: lineEnd,
+        polygonStart: function() {
+          clip.point = pointRing;
+          clip.lineStart = ringStart;
+          clip.lineEnd = ringEnd;
+          segments = [];
+          polygon = [];
+          listener.polygonStart();
+        },
+        polygonEnd: function() {
+          clip.point = point;
+          clip.lineStart = lineStart;
+          clip.lineEnd = lineEnd;
+          segments = d3.merge(segments);
+          if (segments.length) {
+            d3_geo_clipPolygon(segments, d3_geo_clipSort, null, interpolate, listener);
+          } else if (polygonContains(polygon)) {
+            listener.lineStart();
+            interpolate(null, null, 1, listener);
+            listener.lineEnd();
+          }
+          listener.polygonEnd();
+          segments = polygon = null;
+        },
+        sphere: function() {
+          listener.polygonStart();
+          listener.lineStart();
+          interpolate(null, null, 1, listener);
+          listener.lineEnd();
+          listener.polygonEnd();
+        }
+      };
+      function point(λ, φ) {
+        if (pointVisible(λ, φ)) listener.point(λ, φ);
+      }
+      function pointLine(λ, φ) {
+        line.point(λ, φ);
+      }
+      function lineStart() {
+        clip.point = pointLine;
+        line.lineStart();
+      }
+      function lineEnd() {
+        clip.point = point;
+        line.lineEnd();
+      }
+      var segments;
+      var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), polygon, ring;
+      function pointRing(λ, φ) {
+        ringListener.point(λ, φ);
+        ring.push([ λ, φ ]);
+      }
+      function ringStart() {
+        ringListener.lineStart();
+        ring = [];
+      }
+      function ringEnd() {
+        pointRing(ring[0][0], ring[0][1]);
+        ringListener.lineEnd();
+        var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length;
+        ring.pop();
+        polygon.push(ring);
+        ring = null;
+        if (!n) return;
+        if (clean & 1) {
+          segment = ringSegments[0];
+          var n = segment.length - 1, i = -1, point;
+          listener.lineStart();
+          while (++i < n) listener.point((point = segment[i])[0], point[1]);
+          listener.lineEnd();
+          return;
+        }
+        if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
+        segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));
+      }
+      return clip;
+    };
+  }
+  function d3_geo_clipSegmentLength1(segment) {
+    return segment.length > 1;
+  }
+  function d3_geo_clipBufferListener() {
+    var lines = [], line;
+    return {
+      lineStart: function() {
+        lines.push(line = []);
+      },
+      point: function(λ, φ) {
+        line.push([ λ, φ ]);
+      },
+      lineEnd: d3_noop,
+      buffer: function() {
+        var buffer = lines;
+        lines = [];
+        line = null;
+        return buffer;
+      },
+      rejoin: function() {
+        if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
+      }
+    };
+  }
+  function d3_geo_clipSort(a, b) {
+    return ((a = a.point)[0] < 0 ? a[1] - π / 2 - ε : π / 2 - a[1]) - ((b = b.point)[0] < 0 ? b[1] - π / 2 - ε : π / 2 - b[1]);
+  }
+  function d3_geo_pointInPolygon(point, polygon) {
+    var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, polar = false, southPole = false, winding = 0;
+    d3_geo_areaRingSum.reset();
+    for (var i = 0, n = polygon.length; i < n; ++i) {
+      var ring = polygon[i], m = ring.length;
+      if (!m) continue;
+      var point0 = ring[0], λ0 = point0[0], φ0 = point0[1] / 2 + π / 4, sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), j = 1;
+      while (true) {
+        if (j === m) j = 0;
+        point = ring[j];
+        var λ = point[0], φ = point[1] / 2 + π / 4, sinφ = Math.sin(φ), cosφ = Math.cos(φ), dλ = λ - λ0, antimeridian = Math.abs(dλ) > π, k = sinφ0 * sinφ;
+        d3_geo_areaRingSum.add(Math.atan2(k * Math.sin(dλ), cosφ0 * cosφ + k * Math.cos(dλ)));
+        if (Math.abs(φ) < ε) southPole = true;
+        polarAngle += antimeridian ? dλ + (dλ >= 0 ? 2 : -2) * π : dλ;
+        if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) {
+          var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point));
+          d3_geo_cartesianNormalize(arc);
+          var intersection = d3_geo_cartesianCross(meridianNormal, arc);
+          d3_geo_cartesianNormalize(intersection);
+          var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]);
+          if (parallel > φarc) {
+            winding += antimeridian ^ dλ >= 0 ? 1 : -1;
+          }
+        }
+        if (!j++) break;
+        λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point;
+      }
+      if (Math.abs(polarAngle) > ε) polar = true;
+    }
+    return (!southPole && !polar && d3_geo_areaRingSum < 0 || polarAngle < -ε) ^ winding & 1;
+  }
+  var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, d3_geo_clipAntimeridianPolygonContains);
+  function d3_geo_clipAntimeridianLine(listener) {
+    var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean;
+    return {
+      lineStart: function() {
+        listener.lineStart();
+        clean = 1;
+      },
+      point: function(λ1, φ1) {
+        var sλ1 = λ1 > 0 ? π : -π, dλ = Math.abs(λ1 - λ0);
+        if (Math.abs(dλ - π) < ε) {
+          listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? π / 2 : -π / 2);
+          listener.point(sλ0, φ0);
+          listener.lineEnd();
+          listener.lineStart();
+          listener.point(sλ1, φ0);
+          listener.point(λ1, φ0);
+          clean = 0;
+        } else if (sλ0 !== sλ1 && dλ >= π) {
+          if (Math.abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε;
+          if (Math.abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε;
+          φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1);
+          listener.point(sλ0, φ0);
+          listener.lineEnd();
+          listener.lineStart();
+          listener.point(sλ1, φ0);
+          clean = 0;
+        }
+        listener.point(λ0 = λ1, φ0 = φ1);
+        sλ0 = sλ1;
+      },
+      lineEnd: function() {
+        listener.lineEnd();
+        λ0 = φ0 = NaN;
+      },
+      clean: function() {
+        return 2 - clean;
+      }
+    };
+  }
+  function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) {
+    var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1);
+    return Math.abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2;
+  }
+  function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) {
+    var φ;
+    if (from == null) {
+      φ = direction * π / 2;
+      listener.point(-π, φ);
+      listener.point(0, φ);
+      listener.point(π, φ);
+      listener.point(π, 0);
+      listener.point(π, -φ);
+      listener.point(0, -φ);
+      listener.point(-π, -φ);
+      listener.point(-π, 0);
+      listener.point(-π, φ);
+    } else if (Math.abs(from[0] - to[0]) > ε) {
+      var s = (from[0] < to[0] ? 1 : -1) * π;
+      φ = direction * s / 2;
+      listener.point(-s, φ);
+      listener.point(0, φ);
+      listener.point(s, φ);
+    } else {
+      listener.point(to[0], to[1]);
+    }
+  }
+  var d3_geo_clipAntimeridianPoint = [ -π, 0 ];
+  function d3_geo_clipAntimeridianPolygonContains(polygon) {
+    return d3_geo_pointInPolygon(d3_geo_clipAntimeridianPoint, polygon);
+  }
+  function d3_geo_clipCircle(radius) {
+    var cr = Math.cos(radius), smallRadius = cr > 0, point = [ radius, 0 ], notHemisphere = Math.abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
+    return d3_geo_clip(visible, clipLine, interpolate, polygonContains);
+    function visible(λ, φ) {
+      return Math.cos(λ) * Math.cos(φ) > cr;
+    }
+    function clipLine(listener) {
+      var point0, c0, v0, v00, clean;
+      return {
+        lineStart: function() {
+          v00 = v0 = false;
+          clean = 1;
+        },
+        point: function(λ, φ) {
+          var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;
+          if (!point0 && (v00 = v0 = v)) listener.lineStart();
+          if (v !== v0) {
+            point2 = intersect(point0, point1);
+            if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) {
+              point1[0] += ε;
+              point1[1] += ε;
+              v = visible(point1[0], point1[1]);
+            }
+          }
+          if (v !== v0) {
+            clean = 0;
+            if (v) {
+              listener.lineStart();
+              point2 = intersect(point1, point0);
+              listener.point(point2[0], point2[1]);
+            } else {
+              point2 = intersect(point0, point1);
+              listener.point(point2[0], point2[1]);
+              listener.lineEnd();
+            }
+            point0 = point2;
+          } else if (notHemisphere && point0 && smallRadius ^ v) {
+            var t;
+            if (!(c & c0) && (t = intersect(point1, point0, true))) {
+              clean = 0;
+              if (smallRadius) {
+                listener.lineStart();
+                listener.point(t[0][0], t[0][1]);
+                listener.point(t[1][0], t[1][1]);
+                listener.lineEnd();
+              } else {
+                listener.point(t[1][0], t[1][1]);
+                listener.lineEnd();
+                listener.lineStart();
+                listener.point(t[0][0], t[0][1]);
+              }
+            }
+          }
+          if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) {
+            listener.point(point1[0], point1[1]);
+          }
+          point0 = point1, v0 = v, c0 = c;
+        },
+        lineEnd: function() {
+          if (v0) listener.lineEnd();
+          point0 = null;
+        },
+        clean: function() {
+          return clean | (v00 && v0) << 1;
+        }
+      };
+    }
+    function intersect(a, b, two) {
+      var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b);
+      var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2;
+      if (!determinant) return !two && a;
+      var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2);
+      d3_geo_cartesianAdd(A, B);
+      var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1);
+      if (t2 < 0) return;
+      var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu);
+      d3_geo_cartesianAdd(q, A);
+      q = d3_geo_spherical(q);
+      if (!two) return q;
+      var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z;
+      if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z;
+      var δλ = λ1 - λ0, polar = Math.abs(δλ - π) < ε, meridian = polar || δλ < ε;
+      if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z;
+      if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (Math.abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > π ^ (λ0 <= q[0] && q[0] <= λ1)) {
+        var q1 = d3_geo_cartesianScale(u, (-w + t) / uu);
+        d3_geo_cartesianAdd(q1, A);
+        return [ q, d3_geo_spherical(q1) ];
+      }
+    }
+    function code(λ, φ) {
+      var r = smallRadius ? radius : π - radius, code = 0;
+      if (λ < -r) code |= 1; else if (λ > r) code |= 2;
+      if (φ < -r) code |= 4; else if (φ > r) code |= 8;
+      return code;
+    }
+    function polygonContains(polygon) {
+      return d3_geo_pointInPolygon(point, polygon);
+    }
+  }
+  var d3_geo_clipViewMAX = 1e9;
+  function d3_geo_clipView(x0, y0, x1, y1) {
+    return function(listener) {
+      var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), segments, polygon, ring;
+      var clip = {
+        point: point,
+        lineStart: lineStart,
+        lineEnd: lineEnd,
+        polygonStart: function() {
+          listener = bufferListener;
+          segments = [];
+          polygon = [];
+        },
+        polygonEnd: function() {
+          listener = listener_;
+          if ((segments = d3.merge(segments)).length) {
+            listener.polygonStart();
+            d3_geo_clipPolygon(segments, compare, inside, interpolate, listener);
+            listener.polygonEnd();
+          } else if (insidePolygon([ x0, y0 ])) {
+            listener.polygonStart(), listener.lineStart();
+            interpolate(null, null, 1, listener);
+            listener.lineEnd(), listener.polygonEnd();
+          }
+          segments = polygon = ring = null;
+        }
+      };
+      function inside(point) {
+        var a = corner(point, -1), i = insidePolygon([ a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0 ]);
+        return i;
+      }
+      function insidePolygon(p) {
+        var wn = 0, n = polygon.length, y = p[1];
+        for (var i = 0; i < n; ++i) {
+          for (var j = 1, v = polygon[i], m = v.length, a = v[0], b; j < m; ++j) {
+            b = v[j];
+            if (a[1] <= y) {
+              if (b[1] > y && isLeft(a, b, p) > 0) ++wn;
+            } else {
+              if (b[1] <= y && isLeft(a, b, p) < 0) --wn;
+            }
+            a = b;
+          }
+        }
+        return wn !== 0;
+      }
+      function isLeft(a, b, c) {
+        return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]);
+      }
+      function interpolate(from, to, direction, listener) {
+        var a = 0, a1 = 0;
+        if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) {
+          do {
+            listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);
+          } while ((a = (a + direction + 4) % 4) !== a1);
+        } else {
+          listener.point(to[0], to[1]);
+        }
+      }
+      function visible(x, y) {
+        return x0 <= x && x <= x1 && y0 <= y && y <= y1;
+      }
+      function point(x, y) {
+        if (visible(x, y)) listener.point(x, y);
+      }
+      var x__, y__, v__, x_, y_, v_, first;
+      function lineStart() {
+        clip.point = linePoint;
+        if (polygon) polygon.push(ring = []);
+        first = true;
+        v_ = false;
+        x_ = y_ = NaN;
+      }
+      function lineEnd() {
+        if (segments) {
+          linePoint(x__, y__);
+          if (v__ && v_) bufferListener.rejoin();
+          segments.push(bufferListener.buffer());
+        }
+        clip.point = point;
+        if (v_) listener.lineEnd();
+      }
+      function linePoint(x, y) {
+        x = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, x));
+        y = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, y));
+        var v = visible(x, y);
+        if (polygon) ring.push([ x, y ]);
+        if (first) {
+          x__ = x, y__ = y, v__ = v;
+          first = false;
+          if (v) {
+            listener.lineStart();
+            listener.point(x, y);
+          }
+        } else {
+          if (v && v_) listener.point(x, y); else {
+            var a = [ x_, y_ ], b = [ x, y ];
+            if (clipLine(a, b)) {
+              if (!v_) {
+                listener.lineStart();
+                listener.point(a[0], a[1]);
+              }
+              listener.point(b[0], b[1]);
+              if (!v) listener.lineEnd();
+            } else if (v) {
+              listener.lineStart();
+              listener.point(x, y);
+            }
+          }
+        }
+        x_ = x, y_ = y, v_ = v;
+      }
+      return clip;
+    };
+    function corner(p, direction) {
+      return Math.abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : Math.abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : Math.abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2;
+    }
+    function compare(a, b) {
+      return comparePoints(a.point, b.point);
+    }
+    function comparePoints(a, b) {
+      var ca = corner(a, 1), cb = corner(b, 1);
+      return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0];
+    }
+    function clipLine(a, b) {
+      var dx = b[0] - a[0], dy = b[1] - a[1], t = [ 0, 1 ];
+      if (Math.abs(dx) < ε && Math.abs(dy) < ε) return x0 <= a[0] && a[0] <= x1 && y0 <= a[1] && a[1] <= y1;
+      if (d3_geo_clipViewT(x0 - a[0], dx, t) && d3_geo_clipViewT(a[0] - x1, -dx, t) && d3_geo_clipViewT(y0 - a[1], dy, t) && d3_geo_clipViewT(a[1] - y1, -dy, t)) {
+        if (t[1] < 1) {
+          b[0] = a[0] + t[1] * dx;
+          b[1] = a[1] + t[1] * dy;
+        }
+        if (t[0] > 0) {
+          a[0] += t[0] * dx;
+          a[1] += t[0] * dy;
+        }
+        return true;
+      }
+      return false;
+    }
+  }
+  function d3_geo_clipViewT(num, denominator, t) {
+    if (Math.abs(denominator) < ε) return num <= 0;
+    var u = num / denominator;
+    if (denominator > 0) {
+      if (u > t[1]) return false;
+      if (u > t[0]) t[0] = u;
+    } else {
+      if (u < t[0]) return false;
+      if (u < t[1]) t[1] = u;
+    }
+    return true;
+  }
+  function d3_geo_compose(a, b) {
+    function compose(x, y) {
+      return x = a(x, y), b(x[0], x[1]);
+    }
+    if (a.invert && b.invert) compose.invert = function(x, y) {
+      return x = b.invert(x, y), x && a.invert(x[0], x[1]);
+    };
+    return compose;
+  }
+  function d3_geo_conic(projectAt) {
+    var φ0 = 0, φ1 = π / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1);
+    p.parallels = function(_) {
+      if (!arguments.length) return [ φ0 / π * 180, φ1 / π * 180 ];
+      return m(φ0 = _[0] * π / 180, φ1 = _[1] * π / 180);
+    };
+    return p;
+  }
+  function d3_geo_conicEqualArea(φ0, φ1) {
+    var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), ρ0 = Math.sqrt(C) / n;
+    function forward(λ, φ) {
+      var ρ = Math.sqrt(C - 2 * n * Math.sin(φ)) / n;
+      return [ ρ * Math.sin(λ *= n), ρ0 - ρ * Math.cos(λ) ];
+    }
+    forward.invert = function(x, y) {
+      var ρ0_y = ρ0 - y;
+      return [ Math.atan2(x, ρ0_y) / n, d3_asin((C - (x * x + ρ0_y * ρ0_y) * n * n) / (2 * n)) ];
+    };
+    return forward;
+  }
+  (d3.geo.conicEqualArea = function() {
+    return d3_geo_conic(d3_geo_conicEqualArea);
+  }).raw = d3_geo_conicEqualArea;
+  d3.geo.albers = function() {
+    return d3.geo.conicEqualArea().rotate([ 96, 0 ]).center([ -.6, 38.7 ]).parallels([ 29.5, 45.5 ]).scale(1070);
+  };
+  d3.geo.albersUsa = function() {
+    var lower48 = d3.geo.albers();
+    var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);
+    var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);
+    var point, pointStream = {
+      point: function(x, y) {
+        point = [ x, y ];
+      }
+    }, lower48Point, alaskaPoint, hawaiiPoint;
+    function albersUsa(coordinates) {
+      var x = coordinates[0], y = coordinates[1];
+      point = null;
+      (lower48Point(x, y), point) || (alaskaPoint(x, y), point) || hawaiiPoint(x, y);
+      return point;
+    }
+    albersUsa.invert = function(coordinates) {
+      var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k;
+      return (y >= .12 && y < .234 && x >= -.425 && x < -.214 ? alaska : y >= .166 && y < .234 && x >= -.214 && x < -.115 ? hawaii : lower48).invert(coordinates);
+    };
+    albersUsa.stream = function(stream) {
+      var lower48Stream = lower48.stream(stream), alaskaStream = alaska.stream(stream), hawaiiStream = hawaii.stream(stream);
+      return {
+        point: function(x, y) {
+          lower48Stream.point(x, y);
+          alaskaStream.point(x, y);
+          hawaiiStream.point(x, y);
+        },
+        sphere: function() {
+          lower48Stream.sphere();
+          alaskaStream.sphere();
+          hawaiiStream.sphere();
+        },
+        lineStart: function() {
+          lower48Stream.lineStart();
+          alaskaStream.lineStart();
+          hawaiiStream.lineStart();
+        },
+        lineEnd: function() {
+          lower48Stream.lineEnd();
+          alaskaStream.lineEnd();
+          hawaiiStream.lineEnd();
+        },
+        polygonStart: function() {
+          lower48Stream.polygonStart();
+          alaskaStream.polygonStart();
+          hawaiiStream.polygonStart();
+        },
+        polygonEnd: function() {
+          lower48Stream.polygonEnd();
+          alaskaStream.polygonEnd();
+          hawaiiStream.polygonEnd();
+        }
+      };
+    };
+    albersUsa.precision = function(_) {
+      if (!arguments.length) return lower48.precision();
+      lower48.precision(_);
+      alaska.precision(_);
+      hawaii.precision(_);
+      return albersUsa;
+    };
+    albersUsa.scale = function(_) {
+      if (!arguments.length) return lower48.scale();
+      lower48.scale(_);
+      alaska.scale(_ * .35);
+      hawaii.scale(_);
+      return albersUsa.translate(lower48.translate());
+    };
+    albersUsa.translate = function(_) {
+      if (!arguments.length) return lower48.translate();
+      var k = lower48.scale(), x = +_[0], y = +_[1];
+      lower48Point = lower48.translate(_).clipExtent([ [ x - .455 * k, y - .238 * k ], [ x + .455 * k, y + .238 * k ] ]).stream(pointStream).point;
+      alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;
+      hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;
+      return albersUsa;
+    };
+    return albersUsa.scale(1070);
+  };
+  var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = {
+    point: d3_noop,
+    lineStart: d3_noop,
+    lineEnd: d3_noop,
+    polygonStart: function() {
+      d3_geo_pathAreaPolygon = 0;
+      d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart;
+    },
+    polygonEnd: function() {
+      d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop;
+      d3_geo_pathAreaSum += Math.abs(d3_geo_pathAreaPolygon / 2);
+    }
+  };
+  function d3_geo_pathAreaRingStart() {
+    var x00, y00, x0, y0;
+    d3_geo_pathArea.point = function(x, y) {
+      d3_geo_pathArea.point = nextPoint;
+      x00 = x0 = x, y00 = y0 = y;
+    };
+    function nextPoint(x, y) {
+      d3_geo_pathAreaPolygon += y0 * x - x0 * y;
+      x0 = x, y0 = y;
+    }
+    d3_geo_pathArea.lineEnd = function() {
+      nextPoint(x00, y00);
+    };
+  }
+  var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1;
+  var d3_geo_pathBounds = {
+    point: d3_geo_pathBoundsPoint,
+    lineStart: d3_noop,
+    lineEnd: d3_noop,
+    polygonStart: d3_noop,
+    polygonEnd: d3_noop
+  };
+  function d3_geo_pathBoundsPoint(x, y) {
+    if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x;
+    if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x;
+    if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y;
+    if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y;
+  }
+  function d3_geo_pathBuffer() {
+    var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];
+    var stream = {
+      point: point,
+      lineStart: function() {
+        stream.point = pointLineStart;
+      },
+      lineEnd: lineEnd,
+      polygonStart: function() {
+        stream.lineEnd = lineEndPolygon;
+      },
+      polygonEnd: function() {
+        stream.lineEnd = lineEnd;
+        stream.point = point;
+      },
+      pointRadius: function(_) {
+        pointCircle = d3_geo_pathBufferCircle(_);
+        return stream;
+      },
+      result: function() {
+        if (buffer.length) {
+          var result = buffer.join("");
+          buffer = [];
+          return result;
+        }
+      }
+    };
+    function point(x, y) {
+      buffer.push("M", x, ",", y, pointCircle);
+    }
+    function pointLineStart(x, y) {
+      buffer.push("M", x, ",", y);
+      stream.point = pointLine;
+    }
+    function pointLine(x, y) {
+      buffer.push("L", x, ",", y);
+    }
+    function lineEnd() {
+      stream.point = point;
+    }
+    function lineEndPolygon() {
+      buffer.push("Z");
+    }
+    return stream;
+  }
+  function d3_geo_pathBufferCircle(radius) {
+    return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z";
+  }
+  var d3_geo_pathCentroid = {
+    point: d3_geo_pathCentroidPoint,
+    lineStart: d3_geo_pathCentroidLineStart,
+    lineEnd: d3_geo_pathCentroidLineEnd,
+    polygonStart: function() {
+      d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart;
+    },
+    polygonEnd: function() {
+      d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;
+      d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart;
+      d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd;
+    }
+  };
+  function d3_geo_pathCentroidPoint(x, y) {
+    d3_geo_centroidX0 += x;
+    d3_geo_centroidY0 += y;
+    ++d3_geo_centroidZ0;
+  }
+  function d3_geo_pathCentroidLineStart() {
+    var x0, y0;
+    d3_geo_pathCentroid.point = function(x, y) {
+      d3_geo_pathCentroid.point = nextPoint;
+      d3_geo_pathCentroidPoint(x0 = x, y0 = y);
+    };
+    function nextPoint(x, y) {
+      var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);
+      d3_geo_centroidX1 += z * (x0 + x) / 2;
+      d3_geo_centroidY1 += z * (y0 + y) / 2;
+      d3_geo_centroidZ1 += z;
+      d3_geo_pathCentroidPoint(x0 = x, y0 = y);
+    }
+  }
+  function d3_geo_pathCentroidLineEnd() {
+    d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;
+  }
+  function d3_geo_pathCentroidRingStart() {
+    var x00, y00, x0, y0;
+    d3_geo_pathCentroid.point = function(x, y) {
+      d3_geo_pathCentroid.point = nextPoint;
+      d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y);
+    };
+    function nextPoint(x, y) {
+      var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);
+      d3_geo_centroidX1 += z * (x0 + x) / 2;
+      d3_geo_centroidY1 += z * (y0 + y) / 2;
+      d3_geo_centroidZ1 += z;
+      z = y0 * x - x0 * y;
+      d3_geo_centroidX2 += z * (x0 + x);
+      d3_geo_centroidY2 += z * (y0 + y);
+      d3_geo_centroidZ2 += z * 3;
+      d3_geo_pathCentroidPoint(x0 = x, y0 = y);
+    }
+    d3_geo_pathCentroid.lineEnd = function() {
+      nextPoint(x00, y00);
+    };
+  }
+  function d3_geo_pathContext(context) {
+    var pointRadius = 4.5;
+    var stream = {
+      point: point,
+      lineStart: function() {
+        stream.point = pointLineStart;
+      },
+      lineEnd: lineEnd,
+      polygonStart: function() {
+        stream.lineEnd = lineEndPolygon;
+      },
+      polygonEnd: function() {
+        stream.lineEnd = lineEnd;
+        stream.point = point;
+      },
+      pointRadius: function(_) {
+        pointRadius = _;
+        return stream;
+      },
+      result: d3_noop
+    };
+    function point(x, y) {
+      context.moveTo(x, y);
+      context.arc(x, y, pointRadius, 0, 2 * π);
+    }
+    function pointLineStart(x, y) {
+      context.moveTo(x, y);
+      stream.point = pointLine;
+    }
+    function pointLine(x, y) {
+      context.lineTo(x, y);
+    }
+    function lineEnd() {
+      stream.point = point;
+    }
+    function lineEndPolygon() {
+      context.closePath();
+    }
+    return stream;
+  }
+  function d3_geo_resample(project) {
+    var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;
+    function resample(stream) {
+      var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0;
+      var resample = {
+        point: point,
+        lineStart: lineStart,
+        lineEnd: lineEnd,
+        polygonStart: function() {
+          stream.polygonStart();
+          resample.lineStart = ringStart;
+        },
+        polygonEnd: function() {
+          stream.polygonEnd();
+          resample.lineStart = lineStart;
+        }
+      };
+      function point(x, y) {
+        x = project(x, y);
+        stream.point(x[0], x[1]);
+      }
+      function lineStart() {
+        x0 = NaN;
+        resample.point = linePoint;
+        stream.lineStart();
+      }
+      function linePoint(λ, φ) {
+        var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ);
+        resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);
+        stream.point(x0, y0);
+      }
+      function lineEnd() {
+        resample.point = point;
+        stream.lineEnd();
+      }
+      function ringStart() {
+        lineStart();
+        resample.point = ringPoint;
+        resample.lineEnd = ringEnd;
+      }
+      function ringPoint(λ, φ) {
+        linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;
+        resample.point = linePoint;
+      }
+      function ringEnd() {
+        resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream);
+        resample.lineEnd = lineEnd;
+        lineEnd();
+      }
+      return resample;
+    }
+    function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {
+      var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy;
+      if (d2 > 4 * δ2 && depth--) {
+        var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = Math.abs(Math.abs(c) - 1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2;
+        if (dz * dz / d2 > δ2 || Math.abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) {
+          resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream);
+          stream.point(x2, y2);
+          resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream);
+        }
+      }
+    }
+    resample.precision = function(_) {
+      if (!arguments.length) return Math.sqrt(δ2);
+      maxDepth = (δ2 = _ * _) > 0 && 16;
+      return resample;
+    };
+    return resample;
+  }
+  d3.geo.path = function() {
+    var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream;
+    function path(object) {
+      if (object) {
+        if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments));
+        if (!cacheStream || !cacheStream.valid) cacheStream = projectStream(contextStream);
+        d3.geo.stream(object, cacheStream);
+      }
+      return contextStream.result();
+    }
+    path.area = function(object) {
+      d3_geo_pathAreaSum = 0;
+      d3.geo.stream(object, projectStream(d3_geo_pathArea));
+      return d3_geo_pathAreaSum;
+    };
+    path.centroid = function(object) {
+      d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;
+      d3.geo.stream(object, projectStream(d3_geo_pathCentroid));
+      return d3_geo_centroidZ2 ? [ d3_geo_centroidX2 / d3_geo_centroidZ2, d3_geo_centroidY2 / d3_geo_centroidZ2 ] : d3_geo_centroidZ1 ? [ d3_geo_centroidX1 / d3_geo_centroidZ1, d3_geo_centroidY1 / d3_geo_centroidZ1 ] : d3_geo_centroidZ0 ? [ d3_geo_centroidX0 / d3_geo_centroidZ0, d3_geo_centroidY0 / d3_geo_centroidZ0 ] : [ NaN, NaN ];
+    };
+    path.bounds = function(object) {
+      d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity);
+      d3.geo.stream(object, projectStream(d3_geo_pathBounds));
+      return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ];
+    };
+    path.projection = function(_) {
+      if (!arguments.length) return projection;
+      projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity;
+      return reset();
+    };
+    path.context = function(_) {
+      if (!arguments.length) return context;
+      contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_);
+      if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
+      return reset();
+    };
+    path.pointRadius = function(_) {
+      if (!arguments.length) return pointRadius;
+      pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_);
+      return path;
+    };
+    function reset() {
+      cacheStream = null;
+      return path;
+    }
+    return path.projection(d3.geo.albersUsa()).context(null);
+  };
+  function d3_geo_pathProjectStream(project) {
+    var resample = d3_geo_resample(function(λ, φ) {
+      return project([ λ * d3_degrees, φ * d3_degrees ]);
+    });
+    return function(stream) {
+      stream = resample(stream);
+      return {
+        point: function(λ, φ) {
+          stream.point(λ * d3_radians, φ * d3_radians);
+        },
+        sphere: function() {
+          stream.sphere();
+        },
+        lineStart: function() {
+          stream.lineStart();
+        },
+        lineEnd: function() {
+          stream.lineEnd();
+        },
+        polygonStart: function() {
+          stream.polygonStart();
+        },
+        polygonEnd: function() {
+          stream.polygonEnd();
+        }
+      };
+    };
+  }
+  d3.geo.projection = d3_geo_projection;
+  d3.geo.projectionMutator = d3_geo_projectionMutator;
+  function d3_geo_projection(project) {
+    return d3_geo_projectionMutator(function() {
+      return project;
+    })();
+  }
+  function d3_geo_projectionMutator(projectAt) {
+    var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) {
+      x = project(x, y);
+      return [ x[0] * k + δx, δy - x[1] * k ];
+    }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream;
+    function projection(point) {
+      point = projectRotate(point[0] * d3_radians, point[1] * d3_radians);
+      return [ point[0] * k + δx, δy - point[1] * k ];
+    }
+    function invert(point) {
+      point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k);
+      return point && [ point[0] * d3_degrees, point[1] * d3_degrees ];
+    }
+    projection.stream = function(output) {
+      if (stream) stream.valid = false;
+      stream = d3_geo_projectionRadiansRotate(rotate, preclip(projectResample(postclip(output))));
+      stream.valid = true;
+      return stream;
+    };
+    projection.clipAngle = function(_) {
+      if (!arguments.length) return clipAngle;
+      preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians);
+      return invalidate();
+    };
+    projection.clipExtent = function(_) {
+      if (!arguments.length) return clipExtent;
+      clipExtent = _;
+      postclip = _ == null ? d3_identity : d3_geo_clipView(_[0][0], _[0][1], _[1][0], _[1][1]);
+      return invalidate();
+    };
+    projection.scale = function(_) {
+      if (!arguments.length) return k;
+      k = +_;
+      return reset();
+    };
+    projection.translate = function(_) {
+      if (!arguments.length) return [ x, y ];
+      x = +_[0];
+      y = +_[1];
+      return reset();
+    };
+    projection.center = function(_) {
+      if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ];
+      λ = _[0] % 360 * d3_radians;
+      φ = _[1] % 360 * d3_radians;
+      return reset();
+    };
+    projection.rotate = function(_) {
+      if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ];
+      δλ = _[0] % 360 * d3_radians;
+      δφ = _[1] % 360 * d3_radians;
+      δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0;
+      return reset();
+    };
+    d3.rebind(projection, projectResample, "precision");
+    function reset() {
+      projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project);
+      var center = project(λ, φ);
+      δx = x - center[0] * k;
+      δy = y + center[1] * k;
+      return invalidate();
+    }
+    function invalidate() {
+      if (stream) {
+        stream.valid = false;
+        stream = null;
+      }
+      return projection;
+    }
+    return function() {
+      project = projectAt.apply(this, arguments);
+      projection.invert = project.invert && invert;
+      return reset();
+    };
+  }
+  function d3_geo_projectionRadiansRotate(rotate, stream) {
+    return {
+      point: function(x, y) {
+        y = rotate(x * d3_radians, y * d3_radians), x = y[0];
+        stream.point(x > π ? x - 2 * π : x < -π ? x + 2 * π : x, y[1]);
+      },
+      sphere: function() {
+        stream.sphere();
+      },
+      lineStart: function() {
+        stream.lineStart();
+      },
+      lineEnd: function() {
+        stream.lineEnd();
+      },
+      polygonStart: function() {
+        stream.polygonStart();
+      },
+      polygonEnd: function() {
+        stream.polygonEnd();
+      }
+    };
+  }
+  function d3_geo_equirectangular(λ, φ) {
+    return [ λ, φ ];
+  }
+  (d3.geo.equirectangular = function() {
+    return d3_geo_projection(d3_geo_equirectangular);
+  }).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular;
+  d3.geo.rotation = function(rotate) {
+    rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0);
+    function forward(coordinates) {
+      coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
+      return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;
+    }
+    forward.invert = function(coordinates) {
+      coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
+      return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;
+    };
+    return forward;
+  };
+  function d3_geo_rotation(δλ, δφ, δγ) {
+    return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_equirectangular;
+  }
+  function d3_geo_forwardRotationλ(δλ) {
+    return function(λ, φ) {
+      return λ += δλ, [ λ > π ? λ - 2 * π : λ < -π ? λ + 2 * π : λ, φ ];
+    };
+  }
+  function d3_geo_rotationλ(δλ) {
+    var rotation = d3_geo_forwardRotationλ(δλ);
+    rotation.invert = d3_geo_forwardRotationλ(-δλ);
+    return rotation;
+  }
+  function d3_geo_rotationφγ(δφ, δγ) {
+    var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ);
+    function rotation(λ, φ) {
+      var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ;
+      return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), d3_asin(k * cosδγ + y * sinδγ) ];
+    }
+    rotation.invert = function(λ, φ) {
+      var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ;
+      return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), d3_asin(k * cosδφ - x * sinδφ) ];
+    };
+    return rotation;
+  }
+  d3.geo.circle = function() {
+    var origin = [ 0, 0 ], angle, precision = 6, interpolate;
+    function circle() {
+      var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];
+      interpolate(null, null, 1, {
+        point: function(x, y) {
+          ring.push(x = rotate(x, y));
+          x[0] *= d3_degrees, x[1] *= d3_degrees;
+        }
+      });
+      return {
+        type: "Polygon",
+        coordinates: [ ring ]
+      };
+    }
+    circle.origin = function(x) {
+      if (!arguments.length) return origin;
+      origin = x;
+      return circle;
+    };
+    circle.angle = function(x) {
+      if (!arguments.length) return angle;
+      interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians);
+      return circle;
+    };
+    circle.precision = function(_) {
+      if (!arguments.length) return precision;
+      interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians);
+      return circle;
+    };
+    return circle.angle(90);
+  };
+  function d3_geo_circleInterpolate(radius, precision) {
+    var cr = Math.cos(radius), sr = Math.sin(radius);
+    return function(from, to, direction, listener) {
+      if (from != null) {
+        from = d3_geo_circleAngle(cr, from);
+        to = d3_geo_circleAngle(cr, to);
+        if (direction > 0 ? from < to : from > to) from += direction * 2 * π;
+      } else {
+        from = radius + direction * 2 * π;
+        to = radius;
+      }
+      var point;
+      for (var step = direction * precision, t = from; direction > 0 ? t > to : t < to; t -= step) {
+        listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]);
+      }
+    };
+  }
+  function d3_geo_circleAngle(cr, point) {
+    var a = d3_geo_cartesian(point);
+    a[0] -= cr;
+    d3_geo_cartesianNormalize(a);
+    var angle = d3_acos(-a[1]);
+    return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI);
+  }
+  d3.geo.distance = function(a, b) {
+    var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t;
+    return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ);
+  };
+  d3.geo.graticule = function() {
+    var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;
+    function graticule() {
+      return {
+        type: "MultiLineString",
+        coordinates: lines()
+      };
+    }
+    function lines() {
+      return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) {
+        return Math.abs(x % DX) > ε;
+      }).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) {
+        return Math.abs(y % DY) > ε;
+      }).map(y));
+    }
+    graticule.lines = function() {
+      return lines().map(function(coordinates) {
+        return {
+          type: "LineString",
+          coordinates: coordinates
+        };
+      });
+    };
+    graticule.outline = function() {
+      return {
+        type: "Polygon",
+        coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ]
+      };
+    };
+    graticule.extent = function(_) {
+      if (!arguments.length) return graticule.minorExtent();
+      return graticule.majorExtent(_).minorExtent(_);
+    };
+    graticule.majorExtent = function(_) {
+      if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ];
+      X0 = +_[0][0], X1 = +_[1][0];
+      Y0 = +_[0][1], Y1 = +_[1][1];
+      if (X0 > X1) _ = X0, X0 = X1, X1 = _;
+      if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;
+      return graticule.precision(precision);
+    };
+    graticule.minorExtent = function(_) {
+      if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];
+      x0 = +_[0][0], x1 = +_[1][0];
+      y0 = +_[0][1], y1 = +_[1][1];
+      if (x0 > x1) _ = x0, x0 = x1, x1 = _;
+      if (y0 > y1) _ = y0, y0 = y1, y1 = _;
+      return graticule.precision(precision);
+    };
+    graticule.step = function(_) {
+      if (!arguments.length) return graticule.minorStep();
+      return graticule.majorStep(_).minorStep(_);
+    };
+    graticule.majorStep = function(_) {
+      if (!arguments.length) return [ DX, DY ];
+      DX = +_[0], DY = +_[1];
+      return graticule;
+    };
+    graticule.minorStep = function(_) {
+      if (!arguments.length) return [ dx, dy ];
+      dx = +_[0], dy = +_[1];
+      return graticule;
+    };
+    graticule.precision = function(_) {
+      if (!arguments.length) return precision;
+      precision = +_;
+      x = d3_geo_graticuleX(y0, y1, 90);
+      y = d3_geo_graticuleY(x0, x1, precision);
+      X = d3_geo_graticuleX(Y0, Y1, 90);
+      Y = d3_geo_graticuleY(X0, X1, precision);
+      return graticule;
+    };
+    return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]);
+  };
+  function d3_geo_graticuleX(y0, y1, dy) {
+    var y = d3.range(y0, y1 - ε, dy).concat(y1);
+    return function(x) {
+      return y.map(function(y) {
+        return [ x, y ];
+      });
+    };
+  }
+  function d3_geo_graticuleY(x0, x1, dx) {
+    var x = d3.range(x0, x1 - ε, dx).concat(x1);
+    return function(y) {
+      return x.map(function(x) {
+        return [ x, y ];
+      });
+    };
+  }
+  function d3_source(d) {
+    return d.source;
+  }
+  function d3_target(d) {
+    return d.target;
+  }
+  d3.geo.greatArc = function() {
+    var source = d3_source, source_, target = d3_target, target_;
+    function greatArc() {
+      return {
+        type: "LineString",
+        coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ]
+      };
+    }
+    greatArc.distance = function() {
+      return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments));
+    };
+    greatArc.source = function(_) {
+      if (!arguments.length) return source;
+      source = _, source_ = typeof _ === "function" ? null : _;
+      return greatArc;
+    };
+    greatArc.target = function(_) {
+      if (!arguments.length) return target;
+      target = _, target_ = typeof _ === "function" ? null : _;
+      return greatArc;
+    };
+    greatArc.precision = function() {
+      return arguments.length ? greatArc : 0;
+    };
+    return greatArc;
+  };
+  d3.geo.interpolate = function(source, target) {
+    return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians);
+  };
+  function d3_geo_interpolate(x0, y0, x1, y1) {
+    var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d);
+    var interpolate = d ? function(t) {
+      var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;
+      return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ];
+    } : function() {
+      return [ x0 * d3_degrees, y0 * d3_degrees ];
+    };
+    interpolate.distance = d;
+    return interpolate;
+  }
+  d3.geo.length = function(object) {
+    d3_geo_lengthSum = 0;
+    d3.geo.stream(object, d3_geo_length);
+    return d3_geo_lengthSum;
+  };
+  var d3_geo_lengthSum;
+  var d3_geo_length = {
+    sphere: d3_noop,
+    point: d3_noop,
+    lineStart: d3_geo_lengthLineStart,
+    lineEnd: d3_noop,
+    polygonStart: d3_noop,
+    polygonEnd: d3_noop
+  };
+  function d3_geo_lengthLineStart() {
+    var λ0, sinφ0, cosφ0;
+    d3_geo_length.point = function(λ, φ) {
+      λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ);
+      d3_geo_length.point = nextPoint;
+    };
+    d3_geo_length.lineEnd = function() {
+      d3_geo_length.point = d3_geo_length.lineEnd = d3_noop;
+    };
+    function nextPoint(λ, φ) {
+      var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = Math.abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t);
+      d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ);
+      λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ;
+    }
+  }
+  function d3_geo_azimuthal(scale, angle) {
+    function azimuthal(λ, φ) {
+      var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ);
+      return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ];
+    }
+    azimuthal.invert = function(x, y) {
+      var ρ = Math.sqrt(x * x + y * y), c = angle(ρ), sinc = Math.sin(c), cosc = Math.cos(c);
+      return [ Math.atan2(x * sinc, ρ * cosc), Math.asin(ρ && y * sinc / ρ) ];
+    };
+    return azimuthal;
+  }
+  var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) {
+    return Math.sqrt(2 / (1 + cosλcosφ));
+  }, function(ρ) {
+    return 2 * Math.asin(ρ / 2);
+  });
+  (d3.geo.azimuthalEqualArea = function() {
+    return d3_geo_projection(d3_geo_azimuthalEqualArea);
+  }).raw = d3_geo_azimuthalEqualArea;
+  var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) {
+    var c = Math.acos(cosλcosφ);
+    return c && c / Math.sin(c);
+  }, d3_identity);
+  (d3.geo.azimuthalEquidistant = function() {
+    return d3_geo_projection(d3_geo_azimuthalEquidistant);
+  }).raw = d3_geo_azimuthalEquidistant;
+  function d3_geo_conicConformal(φ0, φ1) {
+    var cosφ0 = Math.cos(φ0), t = function(φ) {
+      return Math.tan(π / 4 + φ / 2);
+    }, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n;
+    if (!n) return d3_geo_mercator;
+    function forward(λ, φ) {
+      var ρ = Math.abs(Math.abs(φ) - π / 2) < ε ? 0 : F / Math.pow(t(φ), n);
+      return [ ρ * Math.sin(n * λ), F - ρ * Math.cos(n * λ) ];
+    }
+    forward.invert = function(x, y) {
+      var ρ0_y = F - y, ρ = d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y);
+      return [ Math.atan2(x, ρ0_y) / n, 2 * Math.atan(Math.pow(F / ρ, 1 / n)) - π / 2 ];
+    };
+    return forward;
+  }
+  (d3.geo.conicConformal = function() {
+    return d3_geo_conic(d3_geo_conicConformal);
+  }).raw = d3_geo_conicConformal;
+  function d3_geo_conicEquidistant(φ0, φ1) {
+    var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0;
+    if (Math.abs(n) < ε) return d3_geo_equirectangular;
+    function forward(λ, φ) {
+      var ρ = G - φ;
+      return [ ρ * Math.sin(n * λ), G - ρ * Math.cos(n * λ) ];
+    }
+    forward.invert = function(x, y) {
+      var ρ0_y = G - y;
+      return [ Math.atan2(x, ρ0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y) ];
+    };
+    return forward;
+  }
+  (d3.geo.conicEquidistant = function() {
+    return d3_geo_conic(d3_geo_conicEquidistant);
+  }).raw = d3_geo_conicEquidistant;
+  var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) {
+    return 1 / cosλcosφ;
+  }, Math.atan);
+  (d3.geo.gnomonic = function() {
+    return d3_geo_projection(d3_geo_gnomonic);
+  }).raw = d3_geo_gnomonic;
+  function d3_geo_mercator(λ, φ) {
+    return [ λ, Math.log(Math.tan(π / 4 + φ / 2)) ];
+  }
+  d3_geo_mercator.invert = function(x, y) {
+    return [ x, 2 * Math.atan(Math.exp(y)) - π / 2 ];
+  };
+  function d3_geo_mercatorProjection(project) {
+    var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto;
+    m.scale = function() {
+      var v = scale.apply(m, arguments);
+      return v === m ? clipAuto ? m.clipExtent(null) : m : v;
+    };
+    m.translate = function() {
+      var v = translate.apply(m, arguments);
+      return v === m ? clipAuto ? m.clipExtent(null) : m : v;
+    };
+    m.clipExtent = function(_) {
+      var v = clipExtent.apply(m, arguments);
+      if (v === m) {
+        if (clipAuto = _ == null) {
+          var k = π * scale(), t = translate();
+          clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]);
+        }
+      } else if (clipAuto) {
+        v = null;
+      }
+      return v;
+    };
+    return m.clipExtent(null);
+  }
+  (d3.geo.mercator = function() {
+    return d3_geo_mercatorProjection(d3_geo_mercator);
+  }).raw = d3_geo_mercator;
+  var d3_geo_orthographic = d3_geo_azimuthal(function() {
+    return 1;
+  }, Math.asin);
+  (d3.geo.orthographic = function() {
+    return d3_geo_projection(d3_geo_orthographic);
+  }).raw = d3_geo_orthographic;
+  var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) {
+    return 1 / (1 + cosλcosφ);
+  }, function(ρ) {
+    return 2 * Math.atan(ρ);
+  });
+  (d3.geo.stereographic = function() {
+    return d3_geo_projection(d3_geo_stereographic);
+  }).raw = d3_geo_stereographic;
+  function d3_geo_transverseMercator(λ, φ) {
+    var B = Math.cos(φ) * Math.sin(λ);
+    return [ Math.log((1 + B) / (1 - B)) / 2, Math.atan2(Math.tan(φ), Math.cos(λ)) ];
+  }
+  d3_geo_transverseMercator.invert = function(x, y) {
+    return [ Math.atan2(d3_sinh(x), Math.cos(y)), d3_asin(Math.sin(y) / d3_cosh(x)) ];
+  };
+  (d3.geo.transverseMercator = function() {
+    return d3_geo_mercatorProjection(d3_geo_transverseMercator);
+  }).raw = d3_geo_transverseMercator;
+  d3.geom = {};
+  d3.svg = {};
+  function d3_svg_line(projection) {
+    var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
+    function line(data) {
+      var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
+      function segment() {
+        segments.push("M", interpolate(projection(points), tension));
+      }
+      while (++i < n) {
+        if (defined.call(this, d = data[i], i)) {
+          points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);
+        } else if (points.length) {
+          segment();
+          points = [];
+        }
+      }
+      if (points.length) segment();
+      return segments.length ? segments.join("") : null;
+    }
+    line.x = function(_) {
+      if (!arguments.length) return x;
+      x = _;
+      return line;
+    };
+    line.y = function(_) {
+      if (!arguments.length) return y;
+      y = _;
+      return line;
+    };
+    line.defined = function(_) {
+      if (!arguments.length) return defined;
+      defined = _;
+      return line;
+    };
+    line.interpolate = function(_) {
+      if (!arguments.length) return interpolateKey;
+      if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
+      return line;
+    };
+    line.tension = function(_) {
+      if (!arguments.length) return tension;
+      tension = _;
+      return line;
+    };
+    return line;
+  }
+  d3.svg.line = function() {
+    return d3_svg_line(d3_identity);
+  };
+  function d3_svg_lineX(d) {
+    return d[0];
+  }
+  function d3_svg_lineY(d) {
+    return d[1];
+  }
+  var d3_svg_lineInterpolators = d3.map({
+    linear: d3_svg_lineLinear,
+    "linear-closed": d3_svg_lineLinearClosed,
+    step: d3_svg_lineStep,
+    "step-before": d3_svg_lineStepBefore,
+    "step-after": d3_svg_lineStepAfter,
+    basis: d3_svg_lineBasis,
+    "basis-open": d3_svg_lineBasisOpen,
+    "basis-closed": d3_svg_lineBasisClosed,
+    bundle: d3_svg_lineBundle,
+    cardinal: d3_svg_lineCardinal,
+    "cardinal-open": d3_svg_lineCardinalOpen,
+    "cardinal-closed": d3_svg_lineCardinalClosed,
+    monotone: d3_svg_lineMonotone
+  });
+  d3_svg_lineInterpolators.forEach(function(key, value) {
+    value.key = key;
+    value.closed = /-closed$/.test(key);
+  });
+  function d3_svg_lineLinear(points) {
+    return points.join("L");
+  }
+  function d3_svg_lineLinearClosed(points) {
+    return d3_svg_lineLinear(points) + "Z";
+  }
+  function d3_svg_lineStep(points) {
+    var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
+    while (++i < n) path.push("H", (p[0] + (p = points[i])[0]) / 2, "V", p[1]);
+    if (n > 1) path.push("H", p[0]);
+    return path.join("");
+  }
+  function d3_svg_lineStepBefore(points) {
+    var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
+    while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
+    return path.join("");
+  }
+  function d3_svg_lineStepAfter(points) {
+    var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
+    while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
+    return path.join("");
+  }
+  function d3_svg_lineCardinalOpen(points, tension) {
+    return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), d3_svg_lineCardinalTangents(points, tension));
+  }
+  function d3_svg_lineCardinalClosed(points, tension) {
+    return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite((points.push(points[0]),
+    points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));
+  }
+  function d3_svg_lineCardinal(points, tension) {
+    return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));
+  }
+  function d3_svg_lineHermite(points, tangents) {
+    if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {
+      return d3_svg_lineLinear(points);
+    }
+    var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
+    if (quad) {
+      path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
+      p0 = points[1];
+      pi = 2;
+    }
+    if (tangents.length > 1) {
+      t = tangents[1];
+      p = points[pi];
+      pi++;
+      path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
+      for (var i = 2; i < tangents.length; i++, pi++) {
+        p = points[pi];
+        t = tangents[i];
+        path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
+      }
+    }
+    if (quad) {
+      var lp = points[pi];
+      path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
+    }
+    return path;
+  }
+  function d3_svg_lineCardinalTangents(points, tension) {
+    var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;
+    while (++i < n) {
+      p0 = p1;
+      p1 = p2;
+      p2 = points[i];
+      tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);
+    }
+    return tangents;
+  }
+  function d3_svg_lineBasis(points) {
+    if (points.length < 3) return d3_svg_lineLinear(points);
+    var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0, "L", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
+    points.push(points[n - 1]);
+    while (++i <= n) {
+      pi = points[i];
+      px.shift();
+      px.push(pi[0]);
+      py.shift();
+      py.push(pi[1]);
+      d3_svg_lineBasisBezier(path, px, py);
+    }
+    points.pop();
+    path.push("L", pi);
+    return path.join("");
+  }
+  function d3_svg_lineBasisOpen(points) {
+    if (points.length < 4) return d3_svg_lineLinear(points);
+    var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
+    while (++i < 3) {
+      pi = points[i];
+      px.push(pi[0]);
+      py.push(pi[1]);
+    }
+    path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
+    --i;
+    while (++i < n) {
+      pi = points[i];
+      px.shift();
+      px.push(pi[0]);
+      py.shift();
+      py.push(pi[1]);
+      d3_svg_lineBasisBezier(path, px, py);
+    }
+    return path.join("");
+  }
+  function d3_svg_lineBasisClosed(points) {
+    var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
+    while (++i < 4) {
+      pi = points[i % n];
+      px.push(pi[0]);
+      py.push(pi[1]);
+    }
+    path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
+    --i;
+    while (++i < m) {
+      pi = points[i % n];
+      px.shift();
+      px.push(pi[0]);
+      py.shift();
+      py.push(pi[1]);
+      d3_svg_lineBasisBezier(path, px, py);
+    }
+    return path.join("");
+  }
+  function d3_svg_lineBundle(points, tension) {
+    var n = points.length - 1;
+    if (n) {
+      var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;
+      while (++i <= n) {
+        p = points[i];
+        t = i / n;
+        p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
+        p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
+      }
+    }
+    return d3_svg_lineBasis(points);
+  }
+  function d3_svg_lineDot4(a, b) {
+    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
+  }
+  var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];
+  function d3_svg_lineBasisBezier(path, x, y) {
+    path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
+  }
+  function d3_svg_lineSlope(p0, p1) {
+    return (p1[1] - p0[1]) / (p1[0] - p0[0]);
+  }
+  function d3_svg_lineFiniteDifferences(points) {
+    var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);
+    while (++i < j) {
+      m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;
+    }
+    m[i] = d;
+    return m;
+  }
+  function d3_svg_lineMonotoneTangents(points) {
+    var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;
+    while (++i < j) {
+      d = d3_svg_lineSlope(points[i], points[i + 1]);
+      if (Math.abs(d) < 1e-6) {
+        m[i] = m[i + 1] = 0;
+      } else {
+        a = m[i] / d;
+        b = m[i + 1] / d;
+        s = a * a + b * b;
+        if (s > 9) {
+          s = d * 3 / Math.sqrt(s);
+          m[i] = s * a;
+          m[i + 1] = s * b;
+        }
+      }
+    }
+    i = -1;
+    while (++i <= j) {
+      s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));
+      tangents.push([ s || 0, m[i] * s || 0 ]);
+    }
+    return tangents;
+  }
+  function d3_svg_lineMonotone(points) {
+    return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
+  }
+  d3.geom.hull = function(vertices) {
+    var x = d3_svg_lineX, y = d3_svg_lineY;
+    if (arguments.length) return hull(vertices);
+    function hull(data) {
+      if (data.length < 3) return [];
+      var fx = d3_functor(x), fy = d3_functor(y), n = data.length, vertices, plen = n - 1, points = [], stack = [], d, i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
+      if (fx === d3_svg_lineX && y === d3_svg_lineY) vertices = data; else for (i = 0,
+      vertices = []; i < n; ++i) {
+        vertices.push([ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]);
+      }
+      for (i = 1; i < n; ++i) {
+        if (vertices[i][1] < vertices[h][1] || vertices[i][1] == vertices[h][1] && vertices[i][0] < vertices[h][0]) h = i;
+      }
+      for (i = 0; i < n; ++i) {
+        if (i === h) continue;
+        y1 = vertices[i][1] - vertices[h][1];
+        x1 = vertices[i][0] - vertices[h][0];
+        points.push({
+          angle: Math.atan2(y1, x1),
+          index: i
+        });
+      }
+      points.sort(function(a, b) {
+        return a.angle - b.angle;
+      });
+      a = points[0].angle;
+      v = points[0].index;
+      u = 0;
+      for (i = 1; i < plen; ++i) {
+        j = points[i].index;
+        if (a == points[i].angle) {
+          x1 = vertices[v][0] - vertices[h][0];
+          y1 = vertices[v][1] - vertices[h][1];
+          x2 = vertices[j][0] - vertices[h][0];
+          y2 = vertices[j][1] - vertices[h][1];
+          if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) {
+            points[i].index = -1;
+            continue;
+          } else {
+            points[u].index = -1;
+          }
+        }
+        a = points[i].angle;
+        u = i;
+        v = j;
+      }
+      stack.push(h);
+      for (i = 0, j = 0; i < 2; ++j) {
+        if (points[j].index > -1) {
+          stack.push(points[j].index);
+          i++;
+        }
+      }
+      sp = stack.length;
+      for (;j < plen; ++j) {
+        if (points[j].index < 0) continue;
+        while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) {
+          --sp;
+        }
+        stack[sp++] = points[j].index;
+      }
+      var poly = [];
+      for (i = sp - 1; i >= 0; --i) poly.push(data[stack[i]]);
+      return poly;
+    }
+    hull.x = function(_) {
+      return arguments.length ? (x = _, hull) : x;
+    };
+    hull.y = function(_) {
+      return arguments.length ? (y = _, hull) : y;
+    };
+    return hull;
+  };
+  function d3_geom_hullCCW(i1, i2, i3, v) {
+    var t, a, b, c, d, e, f;
+    t = v[i1];
+    a = t[0];
+    b = t[1];
+    t = v[i2];
+    c = t[0];
+    d = t[1];
+    t = v[i3];
+    e = t[0];
+    f = t[1];
+    return (f - b) * (c - a) - (d - b) * (e - a) > 0;
+  }
+  d3.geom.polygon = function(coordinates) {
+    d3_subclass(coordinates, d3_geom_polygonPrototype);
+    return coordinates;
+  };
+  var d3_geom_polygonPrototype = d3.geom.polygon.prototype = [];
+  d3_geom_polygonPrototype.area = function() {
+    var i = -1, n = this.length, a, b = this[n - 1], area = 0;
+    while (++i < n) {
+      a = b;
+      b = this[i];
+      area += a[1] * b[0] - a[0] * b[1];
+    }
+    return area * .5;
+  };
+  d3_geom_polygonPrototype.centroid = function(k) {
+    var i = -1, n = this.length, x = 0, y = 0, a, b = this[n - 1], c;
+    if (!arguments.length) k = -1 / (6 * this.area());
+    while (++i < n) {
+      a = b;
+      b = this[i];
+      c = a[0] * b[1] - b[0] * a[1];
+      x += (a[0] + b[0]) * c;
+      y += (a[1] + b[1]) * c;
+    }
+    return [ x * k, y * k ];
+  };
+  d3_geom_polygonPrototype.clip = function(subject) {
+    var input, closed = d3_geom_polygonClosed(subject), i = -1, n = this.length - d3_geom_polygonClosed(this), j, m, a = this[n - 1], b, c, d;
+    while (++i < n) {
+      input = subject.slice();
+      subject.length = 0;
+      b = this[i];
+      c = input[(m = input.length - closed) - 1];
+      j = -1;
+      while (++j < m) {
+        d = input[j];
+        if (d3_geom_polygonInside(d, a, b)) {
+          if (!d3_geom_polygonInside(c, a, b)) {
+            subject.push(d3_geom_polygonIntersect(c, d, a, b));
+          }
+          subject.push(d);
+        } else if (d3_geom_polygonInside(c, a, b)) {
+          subject.push(d3_geom_polygonIntersect(c, d, a, b));
+        }
+        c = d;
+      }
+      if (closed) subject.push(subject[0]);
+      a = b;
+    }
+    return subject;
+  };
+  function d3_geom_polygonInside(p, a, b) {
+    return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
+  }
+  function d3_geom_polygonIntersect(c, d, a, b) {
+    var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21);
+    return [ x1 + ua * x21, y1 + ua * y21 ];
+  }
+  function d3_geom_polygonClosed(coordinates) {
+    var a = coordinates[0], b = coordinates[coordinates.length - 1];
+    return !(a[0] - b[0] || a[1] - b[1]);
+  }
+  d3.geom.delaunay = function(vertices) {
+    var edges = vertices.map(function() {
+      return [];
+    }), triangles = [];
+    d3_geom_voronoiTessellate(vertices, function(e) {
+      edges[e.region.l.index].push(vertices[e.region.r.index]);
+    });
+    edges.forEach(function(edge, i) {
+      var v = vertices[i], cx = v[0], cy = v[1];
+      edge.forEach(function(v) {
+        v.angle = Math.atan2(v[0] - cx, v[1] - cy);
+      });
+      edge.sort(function(a, b) {
+        return a.angle - b.angle;
+      });
+      for (var j = 0, m = edge.length - 1; j < m; j++) {
+        triangles.push([ v, edge[j], edge[j + 1] ]);
+      }
+    });
+    return triangles;
+  };
+  d3.geom.voronoi = function(points) {
+    var x = d3_svg_lineX, y = d3_svg_lineY, clipPolygon = null;
+    if (arguments.length) return voronoi(points);
+    function voronoi(data) {
+      var points, polygons = data.map(function() {
+        return [];
+      }), fx = d3_functor(x), fy = d3_functor(y), d, i, n = data.length, Z = 1e6;
+      if (fx === d3_svg_lineX && fy === d3_svg_lineY) points = data; else for (points = new Array(n),
+      i = 0; i < n; ++i) {
+        points[i] = [ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ];
+      }
+      d3_geom_voronoiTessellate(points, function(e) {
+        var s1, s2, x1, x2, y1, y2;
+        if (e.a === 1 && e.b >= 0) {
+          s1 = e.ep.r;
+          s2 = e.ep.l;
+        } else {
+          s1 = e.ep.l;
+          s2 = e.ep.r;
+        }
+        if (e.a === 1) {
+          y1 = s1 ? s1.y : -Z;
+          x1 = e.c - e.b * y1;
+          y2 = s2 ? s2.y : Z;
+          x2 = e.c - e.b * y2;
+        } else {
+          x1 = s1 ? s1.x : -Z;
+          y1 = e.c - e.a * x1;
+          x2 = s2 ? s2.x : Z;
+          y2 = e.c - e.a * x2;
+        }
+        var v1 = [ x1, y1 ], v2 = [ x2, y2 ];
+        polygons[e.region.l.index].push(v1, v2);
+        polygons[e.region.r.index].push(v1, v2);
+      });
+      polygons = polygons.map(function(polygon, i) {
+        var cx = points[i][0], cy = points[i][1], angle = polygon.map(function(v) {
+          return Math.atan2(v[0] - cx, v[1] - cy);
+        }), order = d3.range(polygon.length).sort(function(a, b) {
+          return angle[a] - angle[b];
+        });
+        return order.filter(function(d, i) {
+          return !i || angle[d] - angle[order[i - 1]] > ε;
+        }).map(function(d) {
+          return polygon[d];
+        });
+      });
+      polygons.forEach(function(polygon, i) {
+        var n = polygon.length;
+        if (!n) return polygon.push([ -Z, -Z ], [ -Z, Z ], [ Z, Z ], [ Z, -Z ]);
+        if (n > 2) return;
+        var p0 = points[i], p1 = polygon[0], p2 = polygon[1], x0 = p0[0], y0 = p0[1], x1 = p1[0], y1 = p1[1], x2 = p2[0], y2 = p2[1], dx = Math.abs(x2 - x1), dy = y2 - y1;
+        if (Math.abs(dy) < ε) {
+          var y = y0 < y1 ? -Z : Z;
+          polygon.push([ -Z, y ], [ Z, y ]);
+        } else if (dx < ε) {
+          var x = x0 < x1 ? -Z : Z;
+          polygon.push([ x, -Z ], [ x, Z ]);
+        } else {
+          var y = (x2 - x1) * (y1 - y0) < (x1 - x0) * (y2 - y1) ? Z : -Z, z = Math.abs(dy) - dx;
+          if (Math.abs(z) < ε) {
+            polygon.push([ dy < 0 ? y : -y, y ]);
+          } else {
+            if (z > 0) y *= -1;
+            polygon.push([ -Z, y ], [ Z, y ]);
+          }
+        }
+      });
+      if (clipPolygon) for (i = 0; i < n; ++i) clipPolygon.clip(polygons[i]);
+      for (i = 0; i < n; ++i) polygons[i].point = data[i];
+      return polygons;
+    }
+    voronoi.x = function(_) {
+      return arguments.length ? (x = _, voronoi) : x;
+    };
+    voronoi.y = function(_) {
+      return arguments.length ? (y = _, voronoi) : y;
+    };
+    voronoi.clipExtent = function(_) {
+      if (!arguments.length) return clipPolygon && [ clipPolygon[0], clipPolygon[2] ];
+      if (_ == null) clipPolygon = null; else {
+        var x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], y2 = +_[1][1];
+        clipPolygon = d3.geom.polygon([ [ x1, y1 ], [ x1, y2 ], [ x2, y2 ], [ x2, y1 ] ]);
+      }
+      return voronoi;
+    };
+    voronoi.size = function(_) {
+      if (!arguments.length) return clipPolygon && clipPolygon[2];
+      return voronoi.clipExtent(_ && [ [ 0, 0 ], _ ]);
+    };
+    voronoi.links = function(data) {
+      var points, graph = data.map(function() {
+        return [];
+      }), links = [], fx = d3_functor(x), fy = d3_functor(y), d, i, n = data.length;
+      if (fx === d3_svg_lineX && fy === d3_svg_lineY) points = data; else for (points = new Array(n),
+      i = 0; i < n; ++i) {
+        points[i] = [ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ];
+      }
+      d3_geom_voronoiTessellate(points, function(e) {
+        var l = e.region.l.index, r = e.region.r.index;
+        if (graph[l][r]) return;
+        graph[l][r] = graph[r][l] = true;
+        links.push({
+          source: data[l],
+          target: data[r]
+        });
+      });
+      return links;
+    };
+    voronoi.triangles = function(data) {
+      if (x === d3_svg_lineX && y === d3_svg_lineY) return d3.geom.delaunay(data);
+      var points = new Array(n), fx = d3_functor(x), fy = d3_functor(y), d, i = -1, n = data.length;
+      while (++i < n) {
+        (points[i] = [ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]).data = d;
+      }
+      return d3.geom.delaunay(points).map(function(triangle) {
+        return triangle.map(function(point) {
+          return point.data;
+        });
+      });
+    };
+    return voronoi;
+  };
+  var d3_geom_voronoiOpposite = {
+    l: "r",
+    r: "l"
+  };
+  function d3_geom_voronoiTessellate(points, callback) {
+    var Sites = {
+      list: points.map(function(v, i) {
+        return {
+          index: i,
+          x: v[0],
+          y: v[1]
+        };
+      }).sort(function(a, b) {
+        return a.y < b.y ? -1 : a.y > b.y ? 1 : a.x < b.x ? -1 : a.x > b.x ? 1 : 0;
+      }),
+      bottomSite: null
+    };
+    var EdgeList = {
+      list: [],
+      leftEnd: null,
+      rightEnd: null,
+      init: function() {
+        EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
+        EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
+        EdgeList.leftEnd.r = EdgeList.rightEnd;
+        EdgeList.rightEnd.l = EdgeList.leftEnd;
+        EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
+      },
+      createHalfEdge: function(edge, side) {
+        return {
+          edge: edge,
+          side: side,
+          vertex: null,
+          l: null,
+          r: null
+        };
+      },
+      insert: function(lb, he) {
+        he.l = lb;
+        he.r = lb.r;
+        lb.r.l = he;
+        lb.r = he;
+      },
+      leftBound: function(p) {
+        var he = EdgeList.leftEnd;
+        do {
+          he = he.r;
+        } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
+        he = he.l;
+        return he;
+      },
+      del: function(he) {
+        he.l.r = he.r;
+        he.r.l = he.l;
+        he.edge = null;
+      },
+      right: function(he) {
+        return he.r;
+      },
+      left: function(he) {
+        return he.l;
+      },
+      leftRegion: function(he) {
+        return he.edge == null ? Sites.bottomSite : he.edge.region[he.side];
+      },
+      rightRegion: function(he) {
+        return he.edge == null ? Sites.bottomSite : he.edge.region[d3_geom_voronoiOpposite[he.side]];
+      }
+    };
+    var Geom = {
+      bisect: function(s1, s2) {
+        var newEdge = {
+          region: {
+            l: s1,
+            r: s2
+          },
+          ep: {
+            l: null,
+            r: null
+          }
+        };
+        var dx = s2.x - s1.x, dy = s2.y - s1.y, adx = dx > 0 ? dx : -dx, ady = dy > 0 ? dy : -dy;
+        newEdge.c = s1.x * dx + s1.y * dy + (dx * dx + dy * dy) * .5;
+        if (adx > ady) {
+          newEdge.a = 1;
+          newEdge.b = dy / dx;
+          newEdge.c /= dx;
+        } else {
+          newEdge.b = 1;
+          newEdge.a = dx / dy;
+          newEdge.c /= dy;
+        }
+        return newEdge;
+      },
+      intersect: function(el1, el2) {
+        var e1 = el1.edge, e2 = el2.edge;
+        if (!e1 || !e2 || e1.region.r == e2.region.r) {
+          return null;
+        }
+        var d = e1.a * e2.b - e1.b * e2.a;
+        if (Math.abs(d) < 1e-10) {
+          return null;
+        }
+        var xint = (e1.c * e2.b - e2.c * e1.b) / d, yint = (e2.c * e1.a - e1.c * e2.a) / d, e1r = e1.region.r, e2r = e2.region.r, el, e;
+        if (e1r.y < e2r.y || e1r.y == e2r.y && e1r.x < e2r.x) {
+          el = el1;
+          e = e1;
+        } else {
+          el = el2;
+          e = e2;
+        }
+        var rightOfSite = xint >= e.region.r.x;
+        if (rightOfSite && el.side === "l" || !rightOfSite && el.side === "r") {
+          return null;
+        }
+        return {
+          x: xint,
+          y: yint
+        };
+      },
+      rightOf: function(he, p) {
+        var e = he.edge, topsite = e.region.r, rightOfSite = p.x > topsite.x;
+        if (rightOfSite && he.side === "l") {
+          return 1;
+        }
+        if (!rightOfSite && he.side === "r") {
+          return 0;
+        }
+        if (e.a === 1) {
+          var dyp = p.y - topsite.y, dxp = p.x - topsite.x, fast = 0, above = 0;
+          if (!rightOfSite && e.b < 0 || rightOfSite && e.b >= 0) {
+            above = fast = dyp >= e.b * dxp;
+          } else {
+            above = p.x + p.y * e.b > e.c;
+            if (e.b < 0) {
+              above = !above;
+            }
+            if (!above) {
+              fast = 1;
+            }
+          }
+          if (!fast) {
+            var dxs = topsite.x - e.region.l.x;
+            above = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b);
+            if (e.b < 0) {
+              above = !above;
+            }
+          }
+        } else {
+          var yl = e.c - e.a * p.x, t1 = p.y - yl, t2 = p.x - topsite.x, t3 = yl - topsite.y;
+          above = t1 * t1 > t2 * t2 + t3 * t3;
+        }
+        return he.side === "l" ? above : !above;
+      },
+      endPoint: function(edge, side, site) {
+        edge.ep[side] = site;
+        if (!edge.ep[d3_geom_voronoiOpposite[side]]) return;
+        callback(edge);
+      },
+      distance: function(s, t) {
+        var dx = s.x - t.x, dy = s.y - t.y;
+        return Math.sqrt(dx * dx + dy * dy);
+      }
+    };
+    var EventQueue = {
+      list: [],
+      insert: function(he, site, offset) {
+        he.vertex = site;
+        he.ystar = site.y + offset;
+        for (var i = 0, list = EventQueue.list, l = list.length; i < l; i++) {
+          var next = list[i];
+          if (he.ystar > next.ystar || he.ystar == next.ystar && site.x > next.vertex.x) {
+            continue;
+          } else {
+            break;
+          }
+        }
+        list.splice(i, 0, he);
+      },
+      del: function(he) {
+        for (var i = 0, ls = EventQueue.list, l = ls.length; i < l && ls[i] != he; ++i) {}
+        ls.splice(i, 1);
+      },
+      empty: function() {
+        return EventQueue.list.length === 0;
+      },
+      nextEvent: function(he) {
+        for (var i = 0, ls = EventQueue.list, l = ls.length; i < l; ++i) {
+          if (ls[i] == he) return ls[i + 1];
+        }
+        return null;
+      },
+      min: function() {
+        var elem = EventQueue.list[0];
+        return {
+          x: elem.vertex.x,
+          y: elem.ystar
+        };
+      },
+      extractMin: function() {
+        return EventQueue.list.shift();
+      }
+    };
+    EdgeList.init();
+    Sites.bottomSite = Sites.list.shift();
+    var newSite = Sites.list.shift(), newIntStar;
+    var lbnd, rbnd, llbnd, rrbnd, bisector;
+    var bot, top, temp, p, v;
+    var e, pm;
+    while (true) {
+      if (!EventQueue.empty()) {
+        newIntStar = EventQueue.min();
+      }
+      if (newSite && (EventQueue.empty() || newSite.y < newIntStar.y || newSite.y == newIntStar.y && newSite.x < newIntStar.x)) {
+        lbnd = EdgeList.leftBound(newSite);
+        rbnd = EdgeList.right(lbnd);
+        bot = EdgeList.rightRegion(lbnd);
+        e = Geom.bisect(bot, newSite);
+        bisector = EdgeList.createHalfEdge(e, "l");
+        EdgeList.insert(lbnd, bisector);
+        p = Geom.intersect(lbnd, bisector);
+        if (p) {
+          EventQueue.del(lbnd);
+          EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
+        }
+        lbnd = bisector;
+        bisector = EdgeList.createHalfEdge(e, "r");
+        EdgeList.insert(lbnd, bisector);
+        p = Geom.intersect(bisector, rbnd);
+        if (p) {
+          EventQueue.insert(bisector, p, Geom.distance(p, newSite));
+        }
+        newSite = Sites.list.shift();
+      } else if (!EventQueue.empty()) {
+        lbnd = EventQueue.extractMin();
+        llbnd = EdgeList.left(lbnd);
+        rbnd = EdgeList.right(lbnd);
+        rrbnd = EdgeList.right(rbnd);
+        bot = EdgeList.leftRegion(lbnd);
+        top = EdgeList.rightRegion(rbnd);
+        v = lbnd.vertex;
+        Geom.endPoint(lbnd.edge, lbnd.side, v);
+        Geom.endPoint(rbnd.edge, rbnd.side, v);
+        EdgeList.del(lbnd);
+        EventQueue.del(rbnd);
+        EdgeList.del(rbnd);
+        pm = "l";
+        if (bot.y > top.y) {
+          temp = bot;
+          bot = top;
+          top = temp;
+          pm = "r";
+        }
+        e = Geom.bisect(bot, top);
+        bisector = EdgeList.createHalfEdge(e, pm);
+        EdgeList.insert(llbnd, bisector);
+        Geom.endPoint(e, d3_geom_voronoiOpposite[pm], v);
+        p = Geom.intersect(llbnd, bisector);
+        if (p) {
+          EventQueue.del(llbnd);
+          EventQueue.insert(llbnd, p, Geom.distance(p, bot));
+        }
+        p = Geom.intersect(bisector, rrbnd);
+        if (p) {
+          EventQueue.insert(bisector, p, Geom.distance(p, bot));
+        }
+      } else {
+        break;
+      }
+    }
+    for (lbnd = EdgeList.right(EdgeList.leftEnd); lbnd != EdgeList.rightEnd; lbnd = EdgeList.right(lbnd)) {
+      callback(lbnd.edge);
+    }
+  }
+  d3.geom.quadtree = function(points, x1, y1, x2, y2) {
+    var x = d3_svg_lineX, y = d3_svg_lineY, compat;
+    if (compat = arguments.length) {
+      x = d3_geom_quadtreeCompatX;
+      y = d3_geom_quadtreeCompatY;
+      if (compat === 3) {
+        y2 = y1;
+        x2 = x1;
+        y1 = x1 = 0;
+      }
+      return quadtree(points);
+    }
+    function quadtree(data) {
+      var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;
+      if (x1 != null) {
+        x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;
+      } else {
+        x2_ = y2_ = -(x1_ = y1_ = Infinity);
+        xs = [], ys = [];
+        n = data.length;
+        if (compat) for (i = 0; i < n; ++i) {
+          d = data[i];
+          if (d.x < x1_) x1_ = d.x;
+          if (d.y < y1_) y1_ = d.y;
+          if (d.x > x2_) x2_ = d.x;
+          if (d.y > y2_) y2_ = d.y;
+          xs.push(d.x);
+          ys.push(d.y);
+        } else for (i = 0; i < n; ++i) {
+          var x_ = +fx(d = data[i], i), y_ = +fy(d, i);
+          if (x_ < x1_) x1_ = x_;
+          if (y_ < y1_) y1_ = y_;
+          if (x_ > x2_) x2_ = x_;
+          if (y_ > y2_) y2_ = y_;
+          xs.push(x_);
+          ys.push(y_);
+        }
+      }
+      var dx = x2_ - x1_, dy = y2_ - y1_;
+      if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy;
+      function insert(n, d, x, y, x1, y1, x2, y2) {
+        if (isNaN(x) || isNaN(y)) return;
+        if (n.leaf) {
+          var nx = n.x, ny = n.y;
+          if (nx != null) {
+            if (Math.abs(nx - x) + Math.abs(ny - y) < .01) {
+              insertChild(n, d, x, y, x1, y1, x2, y2);
+            } else {
+              var nPoint = n.point;
+              n.x = n.y = n.point = null;
+              insertChild(n, nPoint, nx, ny, x1, y1, x2, y2);
+              insertChild(n, d, x, y, x1, y1, x2, y2);
+            }
+          } else {
+            n.x = x, n.y = y, n.point = d;
+          }
+        } else {
+          insertChild(n, d, x, y, x1, y1, x2, y2);
+        }
+      }
+      function insertChild(n, d, x, y, x1, y1, x2, y2) {
+        var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = x >= sx, bottom = y >= sy, i = (bottom << 1) + right;
+        n.leaf = false;
+        n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
+        if (right) x1 = sx; else x2 = sx;
+        if (bottom) y1 = sy; else y2 = sy;
+        insert(n, d, x, y, x1, y1, x2, y2);
+      }
+      var root = d3_geom_quadtreeNode();
+      root.add = function(d) {
+        insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_);
+      };
+      root.visit = function(f) {
+        d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_);
+      };
+      i = -1;
+      if (x1 == null) {
+        while (++i < n) {
+          insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_);
+        }
+        --i;
+      } else data.forEach(root.add);
+      xs = ys = data = d = null;
+      return root;
+    }
+    quadtree.x = function(_) {
+      return arguments.length ? (x = _, quadtree) : x;
+    };
+    quadtree.y = function(_) {
+      return arguments.length ? (y = _, quadtree) : y;
+    };
+    quadtree.extent = function(_) {
+      if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ];
+      if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0],
+      y2 = +_[1][1];
+      return quadtree;
+    };
+    quadtree.size = function(_) {
+      if (!arguments.length) return x1 == null ? null : [ x2 - x1, y2 - y1 ];
+      if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = y1 = 0, x2 = +_[0], y2 = +_[1];
+      return quadtree;
+    };
+    return quadtree;
+  };
+  function d3_geom_quadtreeCompatX(d) {
+    return d.x;
+  }
+  function d3_geom_quadtreeCompatY(d) {
+    return d.y;
+  }
+  function d3_geom_quadtreeNode() {
+    return {
+      leaf: true,
+      nodes: [],
+      point: null,
+      x: null,
+      y: null
+    };
+  }
+  function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
+    if (!f(node, x1, y1, x2, y2)) {
+      var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;
+      if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
+      if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
+      if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
+      if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
+    }
+  }
+  d3.interpolateRgb = d3_interpolateRgb;
+  function d3_interpolateRgb(a, b) {
+    a = d3.rgb(a);
+    b = d3.rgb(b);
+    var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;
+    return function(t) {
+      return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));
+    };
+  }
+  d3.interpolateObject = d3_interpolateObject;
+  function d3_interpolateObject(a, b) {
+    var i = {}, c = {}, k;
+    for (k in a) {
+      if (k in b) {
+        i[k] = d3_interpolate(a[k], b[k]);
+      } else {
+        c[k] = a[k];
+      }
+    }
+    for (k in b) {
+      if (!(k in a)) {
+        c[k] = b[k];
+      }
+    }
+    return function(t) {
+      for (k in i) c[k] = i[k](t);
+      return c;
+    };
+  }
+  d3.interpolateNumber = d3_interpolateNumber;
+  function d3_interpolateNumber(a, b) {
+    b -= a = +a;
+    return function(t) {
+      return a + b * t;
+    };
+  }
+  d3.interpolateString = d3_interpolateString;
+  function d3_interpolateString(a, b) {
+    var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o;
+    a = a + "", b = b + "";
+    d3_interpolate_number.lastIndex = 0;
+    for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
+      if (m.index) s.push(b.substring(s0, s1 = m.index));
+      q.push({
+        i: s.length,
+        x: m[0]
+      });
+      s.push(null);
+      s0 = d3_interpolate_number.lastIndex;
+    }
+    if (s0 < b.length) s.push(b.substring(s0));
+    for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
+      o = q[i];
+      if (o.x == m[0]) {
+        if (o.i) {
+          if (s[o.i + 1] == null) {
+            s[o.i - 1] += o.x;
+            s.splice(o.i, 1);
+            for (j = i + 1; j < n; ++j) q[j].i--;
+          } else {
+            s[o.i - 1] += o.x + s[o.i + 1];
+            s.splice(o.i, 2);
+            for (j = i + 1; j < n; ++j) q[j].i -= 2;
+          }
+        } else {
+          if (s[o.i + 1] == null) {
+            s[o.i] = o.x;
+          } else {
+            s[o.i] = o.x + s[o.i + 1];
+            s.splice(o.i + 1, 1);
+            for (j = i + 1; j < n; ++j) q[j].i--;
+          }
+        }
+        q.splice(i, 1);
+        n--;
+        i--;
+      } else {
+        o.x = d3_interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
+      }
+    }
+    while (i < n) {
+      o = q.pop();
+      if (s[o.i + 1] == null) {
+        s[o.i] = o.x;
+      } else {
+        s[o.i] = o.x + s[o.i + 1];
+        s.splice(o.i + 1, 1);
+      }
+      n--;
+    }
+    if (s.length === 1) {
+      return s[0] == null ? (o = q[0].x, function(t) {
+        return o(t) + "";
+      }) : function() {
+        return b;
+      };
+    }
+    return function(t) {
+      for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
+      return s.join("");
+    };
+  }
+  var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
+  d3.interpolate = d3_interpolate;
+  function d3_interpolate(a, b) {
+    var i = d3.interpolators.length, f;
+    while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;
+    return f;
+  }
+  d3.interpolators = [ function(a, b) {
+    var t = typeof b;
+    return (t === "string" ? d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_Color ? d3_interpolateRgb : t === "object" ? Array.isArray(b) ? d3_interpolateArray : d3_interpolateObject : d3_interpolateNumber)(a, b);
+  } ];
+  d3.interpolateArray = d3_interpolateArray;
+  function d3_interpolateArray(a, b) {
+    var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;
+    for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i]));
+    for (;i < na; ++i) c[i] = a[i];
+    for (;i < nb; ++i) c[i] = b[i];
+    return function(t) {
+      for (i = 0; i < n0; ++i) c[i] = x[i](t);
+      return c;
+    };
+  }
+  var d3_ease_default = function() {
+    return d3_identity;
+  };
+  var d3_ease = d3.map({
+    linear: d3_ease_default,
+    poly: d3_ease_poly,
+    quad: function() {
+      return d3_ease_quad;
+    },
+    cubic: function() {
+      return d3_ease_cubic;
+    },
+    sin: function() {
+      return d3_ease_sin;
+    },
+    exp: function() {
+      return d3_ease_exp;
+    },
+    circle: function() {
+      return d3_ease_circle;
+    },
+    elastic: d3_ease_elastic,
+    back: d3_ease_back,
+    bounce: function() {
+      return d3_ease_bounce;
+    }
+  });
+  var d3_ease_mode = d3.map({
+    "in": d3_identity,
+    out: d3_ease_reverse,
+    "in-out": d3_ease_reflect,
+    "out-in": function(f) {
+      return d3_ease_reflect(d3_ease_reverse(f));
+    }
+  });
+  d3.ease = function(name) {
+    var i = name.indexOf("-"), t = i >= 0 ? name.substring(0, i) : name, m = i >= 0 ? name.substring(i + 1) : "in";
+    t = d3_ease.get(t) || d3_ease_default;
+    m = d3_ease_mode.get(m) || d3_identity;
+    return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1))));
+  };
+  function d3_ease_clamp(f) {
+    return function(t) {
+      return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
+    };
+  }
+  function d3_ease_reverse(f) {
+    return function(t) {
+      return 1 - f(1 - t);
+    };
+  }
+  function d3_ease_reflect(f) {
+    return function(t) {
+      return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));
+    };
+  }
+  function d3_ease_quad(t) {
+    return t * t;
+  }
+  function d3_ease_cubic(t) {
+    return t * t * t;
+  }
+  function d3_ease_cubicInOut(t) {
+    if (t <= 0) return 0;
+    if (t >= 1) return 1;
+    var t2 = t * t, t3 = t2 * t;
+    return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75);
+  }
+  function d3_ease_poly(e) {
+    return function(t) {
+      return Math.pow(t, e);
+    };
+  }
+  function d3_ease_sin(t) {
+    return 1 - Math.cos(t * π / 2);
+  }
+  function d3_ease_exp(t) {
+    return Math.pow(2, 10 * (t - 1));
+  }
+  function d3_ease_circle(t) {
+    return 1 - Math.sqrt(1 - t * t);
+  }
+  function d3_ease_elastic(a, p) {
+    var s;
+    if (arguments.length < 2) p = .45;
+    if (arguments.length) s = p / (2 * π) * Math.asin(1 / a); else a = 1, s = p / 4;
+    return function(t) {
+      return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * π / p);
+    };
+  }
+  function d3_ease_back(s) {
+    if (!s) s = 1.70158;
+    return function(t) {
+      return t * t * ((s + 1) * t - s);
+    };
+  }
+  function d3_ease_bounce(t) {
+    return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
+  }
+  d3.interpolateHcl = d3_interpolateHcl;
+  function d3_interpolateHcl(a, b) {
+    a = d3.hcl(a);
+    b = d3.hcl(b);
+    var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;
+    if (isNaN(bc)) bc = 0, ac = isNaN(ac) ? b.c : ac;
+    if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
+    return function(t) {
+      return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + "";
+    };
+  }
+  d3.interpolateHsl = d3_interpolateHsl;
+  function d3_interpolateHsl(a, b) {
+    a = d3.hsl(a);
+    b = d3.hsl(b);
+    var ah = a.h, as = a.s, al = a.l, bh = b.h - ah, bs = b.s - as, bl = b.l - al;
+    if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as;
+    if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
+    return function(t) {
+      return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + "";
+    };
+  }
+  d3.interpolateLab = d3_interpolateLab;
+  function d3_interpolateLab(a, b) {
+    a = d3.lab(a);
+    b = d3.lab(b);
+    var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;
+    return function(t) {
+      return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
+    };
+  }
+  d3.interpolateRound = d3_interpolateRound;
+  function d3_interpolateRound(a, b) {
+    b -= a;
+    return function(t) {
+      return Math.round(a + b * t);
+    };
+  }
+  d3.transform = function(string) {
+    var g = d3_document.createElementNS(d3.ns.prefix.svg, "g");
+    return (d3.transform = function(string) {
+      if (string != null) {
+        g.setAttribute("transform", string);
+        var t = g.transform.baseVal.consolidate();
+      }
+      return new d3_transform(t ? t.matrix : d3_transformIdentity);
+    })(string);
+  };
+  function d3_transform(m) {
+    var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;
+    if (r0[0] * r1[1] < r1[0] * r0[1]) {
+      r0[0] *= -1;
+      r0[1] *= -1;
+      kx *= -1;
+      kz *= -1;
+    }
+    this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees;
+    this.translate = [ m.e, m.f ];
+    this.scale = [ kx, ky ];
+    this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0;
+  }
+  d3_transform.prototype.toString = function() {
+    return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
+  };
+  function d3_transformDot(a, b) {
+    return a[0] * b[0] + a[1] * b[1];
+  }
+  function d3_transformNormalize(a) {
+    var k = Math.sqrt(d3_transformDot(a, a));
+    if (k) {
+      a[0] /= k;
+      a[1] /= k;
+    }
+    return k;
+  }
+  function d3_transformCombine(a, b, k) {
+    a[0] += k * b[0];
+    a[1] += k * b[1];
+    return a;
+  }
+  var d3_transformIdentity = {
+    a: 1,
+    b: 0,
+    c: 0,
+    d: 1,
+    e: 0,
+    f: 0
+  };
+  d3.interpolateTransform = d3_interpolateTransform;
+  function d3_interpolateTransform(a, b) {
+    var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
+    if (ta[0] != tb[0] || ta[1] != tb[1]) {
+      s.push("translate(", null, ",", null, ")");
+      q.push({
+        i: 1,
+        x: d3_interpolateNumber(ta[0], tb[0])
+      }, {
+        i: 3,
+        x: d3_interpolateNumber(ta[1], tb[1])
+      });
+    } else if (tb[0] || tb[1]) {
+      s.push("translate(" + tb + ")");
+    } else {
+      s.push("");
+    }
+    if (ra != rb) {
+      if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;
+      q.push({
+        i: s.push(s.pop() + "rotate(", null, ")") - 2,
+        x: d3_interpolateNumber(ra, rb)
+      });
+    } else if (rb) {
+      s.push(s.pop() + "rotate(" + rb + ")");
+    }
+    if (wa != wb) {
+      q.push({
+        i: s.push(s.pop() + "skewX(", null, ")") - 2,
+        x: d3_interpolateNumber(wa, wb)
+      });
+    } else if (wb) {
+      s.push(s.pop() + "skewX(" + wb + ")");
+    }
+    if (ka[0] != kb[0] || ka[1] != kb[1]) {
+      n = s.push(s.pop() + "scale(", null, ",", null, ")");
+      q.push({
+        i: n - 4,
+        x: d3_interpolateNumber(ka[0], kb[0])
+      }, {
+        i: n - 2,
+        x: d3_interpolateNumber(ka[1], kb[1])
+      });
+    } else if (kb[0] != 1 || kb[1] != 1) {
+      s.push(s.pop() + "scale(" + kb + ")");
+    }
+    n = q.length;
+    return function(t) {
+      var i = -1, o;
+      while (++i < n) s[(o = q[i]).i] = o.x(t);
+      return s.join("");
+    };
+  }
+  function d3_uninterpolateNumber(a, b) {
+    b = b - (a = +a) ? 1 / (b - a) : 0;
+    return function(x) {
+      return (x - a) * b;
+    };
+  }
+  function d3_uninterpolateClamp(a, b) {
+    b = b - (a = +a) ? 1 / (b - a) : 0;
+    return function(x) {
+      return Math.max(0, Math.min(1, (x - a) * b));
+    };
+  }
+  d3.layout = {};
+  d3.layout.bundle = function() {
+    return function(links) {
+      var paths = [], i = -1, n = links.length;
+      while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
+      return paths;
+    };
+  };
+  function d3_layout_bundlePath(link) {
+    var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];
+    while (start !== lca) {
+      start = start.parent;
+      points.push(start);
+    }
+    var k = points.length;
+    while (end !== lca) {
+      points.splice(k, 0, end);
+      end = end.parent;
+    }
+    return points;
+  }
+  function d3_layout_bundleAncestors(node) {
+    var ancestors = [], parent = node.parent;
+    while (parent != null) {
+      ancestors.push(node);
+      node = parent;
+      parent = parent.parent;
+    }
+    ancestors.push(node);
+    return ancestors;
+  }
+  function d3_layout_bundleLeastCommonAncestor(a, b) {
+    if (a === b) return a;
+    var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;
+    while (aNode === bNode) {
+      sharedNode = aNode;
+      aNode = aNodes.pop();
+      bNode = bNodes.pop();
+    }
+    return sharedNode;
+  }
+  d3.layout.chord = function() {
+    var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
+    function relayout() {
+      var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
+      chords = [];
+      groups = [];
+      k = 0, i = -1;
+      while (++i < n) {
+        x = 0, j = -1;
+        while (++j < n) {
+          x += matrix[i][j];
+        }
+        groupSums.push(x);
+        subgroupIndex.push(d3.range(n));
+        k += x;
+      }
+      if (sortGroups) {
+        groupIndex.sort(function(a, b) {
+          return sortGroups(groupSums[a], groupSums[b]);
+        });
+      }
+      if (sortSubgroups) {
+        subgroupIndex.forEach(function(d, i) {
+          d.sort(function(a, b) {
+            return sortSubgroups(matrix[i][a], matrix[i][b]);
+          });
+        });
+      }
+      k = (2 * π - padding * n) / k;
+      x = 0, i = -1;
+      while (++i < n) {
+        x0 = x, j = -1;
+        while (++j < n) {
+          var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;
+          subgroups[di + "-" + dj] = {
+            index: di,
+            subindex: dj,
+            startAngle: a0,
+            endAngle: a1,
+            value: v
+          };
+        }
+        groups[di] = {
+          index: di,
+          startAngle: x0,
+          endAngle: x,
+          value: (x - x0) / k
+        };
+        x += padding;
+      }
+      i = -1;
+      while (++i < n) {
+        j = i - 1;
+        while (++j < n) {
+          var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i];
+          if (source.value || target.value) {
+            chords.push(source.value < target.value ? {
+              source: target,
+              target: source
+            } : {
+              source: source,
+              target: target
+            });
+          }
+        }
+      }
+      if (sortChords) resort();
+    }
+    function resort() {
+      chords.sort(function(a, b) {
+        return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);
+      });
+    }
+    chord.matrix = function(x) {
+      if (!arguments.length) return matrix;
+      n = (matrix = x) && matrix.length;
+      chords = groups = null;
+      return chord;
+    };
+    chord.padding = function(x) {
+      if (!arguments.length) return padding;
+      padding = x;
+      chords = groups = null;
+      return chord;
+    };
+    chord.sortGroups = function(x) {
+      if (!arguments.length) return sortGroups;
+      sortGroups = x;
+      chords = groups = null;
+      return chord;
+    };
+    chord.sortSubgroups = function(x) {
+      if (!arguments.length) return sortSubgroups;
+      sortSubgroups = x;
+      chords = null;
+      return chord;
+    };
+    chord.sortChords = function(x) {
+      if (!arguments.length) return sortChords;
+      sortChords = x;
+      if (chords) resort();
+      return chord;
+    };
+    chord.chords = function() {
+      if (!chords) relayout();
+      return chords;
+    };
+    chord.groups = function() {
+      if (!groups) relayout();
+      return groups;
+    };
+    return chord;
+  };
+  d3.layout.force = function() {
+    var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, nodes = [], links = [], distances, strengths, charges;
+    function repulse(node) {
+      return function(quad, x1, _, x2) {
+        if (quad.point !== node) {
+          var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy);
+          if ((x2 - x1) * dn < theta) {
+            var k = quad.charge * dn * dn;
+            node.px -= dx * k;
+            node.py -= dy * k;
+            return true;
+          }
+          if (quad.point && isFinite(dn)) {
+            var k = quad.pointCharge * dn * dn;
+            node.px -= dx * k;
+            node.py -= dy * k;
+          }
+        }
+        return !quad.charge;
+      };
+    }
+    force.tick = function() {
+      if ((alpha *= .99) < .005) {
+        event.end({
+          type: "end",
+          alpha: alpha = 0
+        });
+        return true;
+      }
+      var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;
+      for (i = 0; i < m; ++i) {
+        o = links[i];
+        s = o.source;
+        t = o.target;
+        x = t.x - s.x;
+        y = t.y - s.y;
+        if (l = x * x + y * y) {
+          l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
+          x *= l;
+          y *= l;
+          t.x -= x * (k = s.weight / (t.weight + s.weight));
+          t.y -= y * k;
+          s.x += x * (k = 1 - k);
+          s.y += y * k;
+        }
+      }
+      if (k = alpha * gravity) {
+        x = size[0] / 2;
+        y = size[1] / 2;
+        i = -1;
+        if (k) while (++i < n) {
+          o = nodes[i];
+          o.x += (x - o.x) * k;
+          o.y += (y - o.y) * k;
+        }
+      }
+      if (charge) {
+        d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);
+        i = -1;
+        while (++i < n) {
+          if (!(o = nodes[i]).fixed) {
+            q.visit(repulse(o));
+          }
+        }
+      }
+      i = -1;
+      while (++i < n) {
+        o = nodes[i];
+        if (o.fixed) {
+          o.x = o.px;
+          o.y = o.py;
+        } else {
+          o.x -= (o.px - (o.px = o.x)) * friction;
+          o.y -= (o.py - (o.py = o.y)) * friction;
+        }
+      }
+      event.tick({
+        type: "tick",
+        alpha: alpha
+      });
+    };
+    force.nodes = function(x) {
+      if (!arguments.length) return nodes;
+      nodes = x;
+      return force;
+    };
+    force.links = function(x) {
+      if (!arguments.length) return links;
+      links = x;
+      return force;
+    };
+    force.size = function(x) {
+      if (!arguments.length) return size;
+      size = x;
+      return force;
+    };
+    force.linkDistance = function(x) {
+      if (!arguments.length) return linkDistance;
+      linkDistance = typeof x === "function" ? x : +x;
+      return force;
+    };
+    force.distance = force.linkDistance;
+    force.linkStrength = function(x) {
+      if (!arguments.length) return linkStrength;
+      linkStrength = typeof x === "function" ? x : +x;
+      return force;
+    };
+    force.friction = function(x) {
+      if (!arguments.length) return friction;
+      friction = +x;
+      return force;
+    };
+    force.charge = function(x) {
+      if (!arguments.length) return charge;
+      charge = typeof x === "function" ? x : +x;
+      return force;
+    };
+    force.gravity = function(x) {
+      if (!arguments.length) return gravity;
+      gravity = +x;
+      return force;
+    };
+    force.theta = function(x) {
+      if (!arguments.length) return theta;
+      theta = +x;
+      return force;
+    };
+    force.alpha = function(x) {
+      if (!arguments.length) return alpha;
+      x = +x;
+      if (alpha) {
+        if (x > 0) alpha = x; else alpha = 0;
+      } else if (x > 0) {
+        event.start({
+          type: "start",
+          alpha: alpha = x
+        });
+        d3.timer(force.tick);
+      }
+      return force;
+    };
+    force.start = function() {
+      var i, j, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
+      for (i = 0; i < n; ++i) {
+        (o = nodes[i]).index = i;
+        o.weight = 0;
+      }
+      for (i = 0; i < m; ++i) {
+        o = links[i];
+        if (typeof o.source == "number") o.source = nodes[o.source];
+        if (typeof o.target == "number") o.target = nodes[o.target];
+        ++o.source.weight;
+        ++o.target.weight;
+      }
+      for (i = 0; i < n; ++i) {
+        o = nodes[i];
+        if (isNaN(o.x)) o.x = position("x", w);
+        if (isNaN(o.y)) o.y = position("y", h);
+        if (isNaN(o.px)) o.px = o.x;
+        if (isNaN(o.py)) o.py = o.y;
+      }
+      distances = [];
+      if (typeof linkDistance === "function") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance;
+      strengths = [];
+      if (typeof linkStrength === "function") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength;
+      charges = [];
+      if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;
+      function position(dimension, size) {
+        var neighbors = neighbor(i), j = -1, m = neighbors.length, x;
+        while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
+        return Math.random() * size;
+      }
+      function neighbor() {
+        if (!neighbors) {
+          neighbors = [];
+          for (j = 0; j < n; ++j) {
+            neighbors[j] = [];
+          }
+          for (j = 0; j < m; ++j) {
+            var o = links[j];
+            neighbors[o.source.index].push(o.target);
+            neighbors[o.target.index].push(o.source);
+          }
+        }
+        return neighbors[i];
+      }
+      return force.resume();
+    };
+    force.resume = function() {
+      return force.alpha(.1);
+    };
+    force.stop = function() {
+      return force.alpha(0);
+    };
+    force.drag = function() {
+      if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart.force", d3_layout_forceDragstart).on("drag.force", dragmove).on("dragend.force", d3_layout_forceDragend);
+      if (!arguments.length) return drag;
+      this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag);
+    };
+    function dragmove(d) {
+      d.px = d3.event.x, d.py = d3.event.y;
+      force.resume();
+    }
+    return d3.rebind(force, event, "on");
+  };
+  function d3_layout_forceDragstart(d) {
+    d.fixed |= 2;
+  }
+  function d3_layout_forceDragend(d) {
+    d.fixed &= ~6;
+  }
+  function d3_layout_forceMouseover(d) {
+    d.fixed |= 4;
+    d.px = d.x, d.py = d.y;
+  }
+  function d3_layout_forceMouseout(d) {
+    d.fixed &= ~4;
+  }
+  function d3_layout_forceAccumulate(quad, alpha, charges) {
+    var cx = 0, cy = 0;
+    quad.charge = 0;
+    if (!quad.leaf) {
+      var nodes = quad.nodes, n = nodes.length, i = -1, c;
+      while (++i < n) {
+        c = nodes[i];
+        if (c == null) continue;
+        d3_layout_forceAccumulate(c, alpha, charges);
+        quad.charge += c.charge;
+        cx += c.charge * c.cx;
+        cy += c.charge * c.cy;
+      }
+    }
+    if (quad.point) {
+      if (!quad.leaf) {
+        quad.point.x += Math.random() - .5;
+        quad.point.y += Math.random() - .5;
+      }
+      var k = alpha * charges[quad.point.index];
+      quad.charge += quad.pointCharge = k;
+      cx += k * quad.point.x;
+      cy += k * quad.point.y;
+    }
+    quad.cx = cx / quad.charge;
+    quad.cy = cy / quad.charge;
+  }
+  var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1;
+  d3.layout.hierarchy = function() {
+    var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
+    function recurse(node, depth, nodes) {
+      var childs = children.call(hierarchy, node, depth);
+      node.depth = depth;
+      nodes.push(node);
+      if (childs && (n = childs.length)) {
+        var i = -1, n, c = node.children = [], v = 0, j = depth + 1, d;
+        while (++i < n) {
+          d = recurse(childs[i], j, nodes);
+          d.parent = node;
+          c.push(d);
+          v += d.value;
+        }
+        if (sort) c.sort(sort);
+        if (value) node.value = v;
+      } else if (value) {
+        node.value = +value.call(hierarchy, node, depth) || 0;
+      }
+      return node;
+    }
+    function revalue(node, depth) {
+      var children = node.children, v = 0;
+      if (children && (n = children.length)) {
+        var i = -1, n, j = depth + 1;
+        while (++i < n) v += revalue(children[i], j);
+      } else if (value) {
+        v = +value.call(hierarchy, node, depth) || 0;
+      }
+      if (value) node.value = v;
+      return v;
+    }
+    function hierarchy(d) {
+      var nodes = [];
+      recurse(d, 0, nodes);
+      return nodes;
+    }
+    hierarchy.sort = function(x) {
+      if (!arguments.length) return sort;
+      sort = x;
+      return hierarchy;
+    };
+    hierarchy.children = function(x) {
+      if (!arguments.length) return children;
+      children = x;
+      return hierarchy;
+    };
+    hierarchy.value = function(x) {
+      if (!arguments.length) return value;
+      value = x;
+      return hierarchy;
+    };
+    hierarchy.revalue = function(root) {
+      revalue(root, 0);
+      return root;
+    };
+    return hierarchy;
+  };
+  function d3_layout_hierarchyRebind(object, hierarchy) {
+    d3.rebind(object, hierarchy, "sort", "children", "value");
+    object.nodes = object;
+    object.links = d3_layout_hierarchyLinks;
+    return object;
+  }
+  function d3_layout_hierarchyChildren(d) {
+    return d.children;
+  }
+  function d3_layout_hierarchyValue(d) {
+    return d.value;
+  }
+  function d3_layout_hierarchySort(a, b) {
+    return b.value - a.value;
+  }
+  function d3_layout_hierarchyLinks(nodes) {
+    return d3.merge(nodes.map(function(parent) {
+      return (parent.children || []).map(function(child) {
+        return {
+          source: parent,
+          target: child
+        };
+      });
+    }));
+  }
+  d3.layout.partition = function() {
+    var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];
+    function position(node, x, dx, dy) {
+      var children = node.children;
+      node.x = x;
+      node.y = node.depth * dy;
+      node.dx = dx;
+      node.dy = dy;
+      if (children && (n = children.length)) {
+        var i = -1, n, c, d;
+        dx = node.value ? dx / node.value : 0;
+        while (++i < n) {
+          position(c = children[i], x, d = c.value * dx, dy);
+          x += d;
+        }
+      }
+    }
+    function depth(node) {
+      var children = node.children, d = 0;
+      if (children && (n = children.length)) {
+        var i = -1, n;
+        while (++i < n) d = Math.max(d, depth(children[i]));
+      }
+      return 1 + d;
+    }
+    function partition(d, i) {
+      var nodes = hierarchy.call(this, d, i);
+      position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
+      return nodes;
+    }
+    partition.size = function(x) {
+      if (!arguments.length) return size;
+      size = x;
+      return partition;
+    };
+    return d3_layout_hierarchyRebind(partition, hierarchy);
+  };
+  d3.layout.pie = function() {
+    var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = 2 * π;
+    function pie(data) {
+      var values = data.map(function(d, i) {
+        return +value.call(pie, d, i);
+      });
+      var a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle);
+      var k = ((typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - a) / d3.sum(values);
+      var index = d3.range(data.length);
+      if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {
+        return values[j] - values[i];
+      } : function(i, j) {
+        return sort(data[i], data[j]);
+      });
+      var arcs = [];
+      index.forEach(function(i) {
+        var d;
+        arcs[i] = {
+          data: data[i],
+          value: d = values[i],
+          startAngle: a,
+          endAngle: a += d * k
+        };
+      });
+      return arcs;
+    }
+    pie.value = function(x) {
+      if (!arguments.length) return value;
+      value = x;
+      return pie;
+    };
+    pie.sort = function(x) {
+      if (!arguments.length) return sort;
+      sort = x;
+      return pie;
+    };
+    pie.startAngle = function(x) {
+      if (!arguments.length) return startAngle;
+      startAngle = x;
+      return pie;
+    };
+    pie.endAngle = function(x) {
+      if (!arguments.length) return endAngle;
+      endAngle = x;
+      return pie;
+    };
+    return pie;
+  };
+  var d3_layout_pieSortByValue = {};
+  d3.layout.stack = function() {
+    var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
+    function stack(data, index) {
+      var series = data.map(function(d, i) {
+        return values.call(stack, d, i);
+      });
+      var points = series.map(function(d) {
+        return d.map(function(v, i) {
+          return [ x.call(stack, v, i), y.call(stack, v, i) ];
+        });
+      });
+      var orders = order.call(stack, points, index);
+      series = d3.permute(series, orders);
+      points = d3.permute(points, orders);
+      var offsets = offset.call(stack, points, index);
+      var n = series.length, m = series[0].length, i, j, o;
+      for (j = 0; j < m; ++j) {
+        out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
+        for (i = 1; i < n; ++i) {
+          out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
+        }
+      }
+      return data;
+    }
+    stack.values = function(x) {
+      if (!arguments.length) return values;
+      values = x;
+      return stack;
+    };
+    stack.order = function(x) {
+      if (!arguments.length) return order;
+      order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
+      return stack;
+    };
+    stack.offset = function(x) {
+      if (!arguments.length) return offset;
+      offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
+      return stack;
+    };
+    stack.x = function(z) {
+      if (!arguments.length) return x;
+      x = z;
+      return stack;
+    };
+    stack.y = function(z) {
+      if (!arguments.length) return y;
+      y = z;
+      return stack;
+    };
+    stack.out = function(z) {
+      if (!arguments.length) return out;
+      out = z;
+      return stack;
+    };
+    return stack;
+  };
+  function d3_layout_stackX(d) {
+    return d.x;
+  }
+  function d3_layout_stackY(d) {
+    return d.y;
+  }
+  function d3_layout_stackOut(d, y0, y) {
+    d.y0 = y0;
+    d.y = y;
+  }
+  var d3_layout_stackOrders = d3.map({
+    "inside-out": function(data) {
+      var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {
+        return max[a] - max[b];
+      }), top = 0, bottom = 0, tops = [], bottoms = [];
+      for (i = 0; i < n; ++i) {
+        j = index[i];
+        if (top < bottom) {
+          top += sums[j];
+          tops.push(j);
+        } else {
+          bottom += sums[j];
+          bottoms.push(j);
+        }
+      }
+      return bottoms.reverse().concat(tops);
+    },
+    reverse: function(data) {
+      return d3.range(data.length).reverse();
+    },
+    "default": d3_layout_stackOrderDefault
+  });
+  var d3_layout_stackOffsets = d3.map({
+    silhouette: function(data) {
+      var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];
+      for (j = 0; j < m; ++j) {
+        for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
+        if (o > max) max = o;
+        sums.push(o);
+      }
+      for (j = 0; j < m; ++j) {
+        y0[j] = (max - sums[j]) / 2;
+      }
+      return y0;
+    },
+    wiggle: function(data) {
+      var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];
+      y0[0] = o = o0 = 0;
+      for (j = 1; j < m; ++j) {
+        for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
+        for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
+          for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
+            s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
+          }
+          s2 += s3 * data[i][j][1];
+        }
+        y0[j] = o -= s1 ? s2 / s1 * dx : 0;
+        if (o < o0) o0 = o;
+      }
+      for (j = 0; j < m; ++j) y0[j] -= o0;
+      return y0;
+    },
+    expand: function(data) {
+      var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];
+      for (j = 0; j < m; ++j) {
+        for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
+        if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;
+      }
+      for (j = 0; j < m; ++j) y0[j] = 0;
+      return y0;
+    },
+    zero: d3_layout_stackOffsetZero
+  });
+  function d3_layout_stackOrderDefault(data) {
+    return d3.range(data.length);
+  }
+  function d3_layout_stackOffsetZero(data) {
+    var j = -1, m = data[0].length, y0 = [];
+    while (++j < m) y0[j] = 0;
+    return y0;
+  }
+  function d3_layout_stackMaxIndex(array) {
+    var i = 1, j = 0, v = array[0][1], k, n = array.length;
+    for (;i < n; ++i) {
+      if ((k = array[i][1]) > v) {
+        j = i;
+        v = k;
+      }
+    }
+    return j;
+  }
+  function d3_layout_stackReduceSum(d) {
+    return d.reduce(d3_layout_stackSum, 0);
+  }
+  function d3_layout_stackSum(p, d) {
+    return p + d[1];
+  }
+  d3.layout.histogram = function() {
+    var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
+    function histogram(data, i) {
+      var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
+      while (++i < m) {
+        bin = bins[i] = [];
+        bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
+        bin.y = 0;
+      }
+      if (m > 0) {
+        i = -1;
+        while (++i < n) {
+          x = values[i];
+          if (x >= range[0] && x <= range[1]) {
+            bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
+            bin.y += k;
+            bin.push(data[i]);
+          }
+        }
+      }
+      return bins;
+    }
+    histogram.value = function(x) {
+      if (!arguments.length) return valuer;
+      valuer = x;
+      return histogram;
+    };
+    histogram.range = function(x) {
+      if (!arguments.length) return ranger;
+      ranger = d3_functor(x);
+      return histogram;
+    };
+    histogram.bins = function(x) {
+      if (!arguments.length) return binner;
+      binner = typeof x === "number" ? function(range) {
+        return d3_layout_histogramBinFixed(range, x);
+      } : d3_functor(x);
+      return histogram;
+    };
+    histogram.frequency = function(x) {
+      if (!arguments.length) return frequency;
+      frequency = !!x;
+      return histogram;
+    };
+    return histogram;
+  };
+  function d3_layout_histogramBinSturges(range, values) {
+    return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
+  }
+  function d3_layout_histogramBinFixed(range, n) {
+    var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];
+    while (++x <= n) f[x] = m * x + b;
+    return f;
+  }
+  function d3_layout_histogramRange(values) {
+    return [ d3.min(values), d3.max(values) ];
+  }
+  d3.layout.tree = function() {
+    var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;
+    function tree(d, i) {
+      var nodes = hierarchy.call(this, d, i), root = nodes[0];
+      function firstWalk(node, previousSibling) {
+        var children = node.children, layout = node._tree;
+        if (children && (n = children.length)) {
+          var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1;
+          while (++i < n) {
+            child = children[i];
+            firstWalk(child, previousChild);
+            ancestor = apportion(child, previousChild, ancestor);
+            previousChild = child;
+          }
+          d3_layout_treeShift(node);
+          var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);
+          if (previousSibling) {
+            layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
+            layout.mod = layout.prelim - midpoint;
+          } else {
+            layout.prelim = midpoint;
+          }
+        } else {
+          if (previousSibling) {
+            layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
+          }
+        }
+      }
+      function secondWalk(node, x) {
+        node.x = node._tree.prelim + x;
+        var children = node.children;
+        if (children && (n = children.length)) {
+          var i = -1, n;
+          x += node._tree.mod;
+          while (++i < n) {
+            secondWalk(children[i], x);
+          }
+        }
+      }
+      function apportion(node, previousSibling, ancestor) {
+        if (previousSibling) {
+          var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift;
+          while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
+            vom = d3_layout_treeLeft(vom);
+            vop = d3_layout_treeRight(vop);
+            vop._tree.ancestor = node;
+            shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);
+            if (shift > 0) {
+              d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);
+              sip += shift;
+              sop += shift;
+            }
+            sim += vim._tree.mod;
+            sip += vip._tree.mod;
+            som += vom._tree.mod;
+            sop += vop._tree.mod;
+          }
+          if (vim && !d3_layout_treeRight(vop)) {
+            vop._tree.thread = vim;
+            vop._tree.mod += sim - sop;
+          }
+          if (vip && !d3_layout_treeLeft(vom)) {
+            vom._tree.thread = vip;
+            vom._tree.mod += sip - som;
+            ancestor = node;
+          }
+        }
+        return ancestor;
+      }
+      d3_layout_treeVisitAfter(root, function(node, previousSibling) {
+        node._tree = {
+          ancestor: node,
+          prelim: 0,
+          mod: 0,
+          change: 0,
+          shift: 0,
+          number: previousSibling ? previousSibling._tree.number + 1 : 0
+        };
+      });
+      firstWalk(root);
+      secondWalk(root, -root._tree.prelim);
+      var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), right = d3_layout_treeSearch(root, d3_layout_treeRightmost), deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2, y1 = deep.depth || 1;
+      d3_layout_treeVisitAfter(root, nodeSize ? function(node) {
+        node.x *= size[0];
+        node.y = node.depth * size[1];
+        delete node._tree;
+      } : function(node) {
+        node.x = (node.x - x0) / (x1 - x0) * size[0];
+        node.y = node.depth / y1 * size[1];
+        delete node._tree;
+      });
+      return nodes;
+    }
+    tree.separation = function(x) {
+      if (!arguments.length) return separation;
+      separation = x;
+      return tree;
+    };
+    tree.size = function(x) {
+      if (!arguments.length) return nodeSize ? null : size;
+      nodeSize = (size = x) == null;
+      return tree;
+    };
+    tree.nodeSize = function(x) {
+      if (!arguments.length) return nodeSize ? size : null;
+      nodeSize = (size = x) != null;
+      return tree;
+    };
+    return d3_layout_hierarchyRebind(tree, hierarchy);
+  };
+  function d3_layout_treeSeparation(a, b) {
+    return a.parent == b.parent ? 1 : 2;
+  }
+  function d3_layout_treeLeft(node) {
+    var children = node.children;
+    return children && children.length ? children[0] : node._tree.thread;
+  }
+  function d3_layout_treeRight(node) {
+    var children = node.children, n;
+    return children && (n = children.length) ? children[n - 1] : node._tree.thread;
+  }
+  function d3_layout_treeSearch(node, compare) {
+    var children = node.children;
+    if (children && (n = children.length)) {
+      var child, n, i = -1;
+      while (++i < n) {
+        if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
+          node = child;
+        }
+      }
+    }
+    return node;
+  }
+  function d3_layout_treeRightmost(a, b) {
+    return a.x - b.x;
+  }
+  function d3_layout_treeLeftmost(a, b) {
+    return b.x - a.x;
+  }
+  function d3_layout_treeDeepest(a, b) {
+    return a.depth - b.depth;
+  }
+  function d3_layout_treeVisitAfter(node, callback) {
+    function visit(node, previousSibling) {
+      var children = node.children;
+      if (children && (n = children.length)) {
+        var child, previousChild = null, i = -1, n;
+        while (++i < n) {
+          child = children[i];
+          visit(child, previousChild);
+          previousChild = child;
+        }
+      }
+      callback(node, previousSibling);
+    }
+    visit(node, null);
+  }
+  function d3_layout_treeShift(node) {
+    var shift = 0, change = 0, children = node.children, i = children.length, child;
+    while (--i >= 0) {
+      child = children[i]._tree;
+      child.prelim += shift;
+      child.mod += shift;
+      shift += child.shift + (change += child.change);
+    }
+  }
+  function d3_layout_treeMove(ancestor, node, shift) {
+    ancestor = ancestor._tree;
+    node = node._tree;
+    var change = shift / (node.number - ancestor.number);
+    ancestor.change += change;
+    node.change -= change;
+    node.shift += shift;
+    node.prelim += shift;
+    node.mod += shift;
+  }
+  function d3_layout_treeAncestor(vim, node, ancestor) {
+    return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor;
+  }
+  d3.layout.pack = function() {
+    var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;
+    function pack(d, i) {
+      var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() {
+        return radius;
+      };
+      root.x = root.y = 0;
+      d3_layout_treeVisitAfter(root, function(d) {
+        d.r = +r(d.value);
+      });
+      d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
+      if (padding) {
+        var dr = padding * (radius ? 1 : Math.max(2 * root.r / w, 2 * root.r / h)) / 2;
+        d3_layout_treeVisitAfter(root, function(d) {
+          d.r += dr;
+        });
+        d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
+        d3_layout_treeVisitAfter(root, function(d) {
+          d.r -= dr;
+        });
+      }
+      d3_layout_packTransform(root, w / 2, h / 2, radius ? 1 : 1 / Math.max(2 * root.r / w, 2 * root.r / h));
+      return nodes;
+    }
+    pack.size = function(_) {
+      if (!arguments.length) return size;
+      size = _;
+      return pack;
+    };
+    pack.radius = function(_) {
+      if (!arguments.length) return radius;
+      radius = _ == null || typeof _ === "function" ? _ : +_;
+      return pack;
+    };
+    pack.padding = function(_) {
+      if (!arguments.length) return padding;
+      padding = +_;
+      return pack;
+    };
+    return d3_layout_hierarchyRebind(pack, hierarchy);
+  };
+  function d3_layout_packSort(a, b) {
+    return a.value - b.value;
+  }
+  function d3_layout_packInsert(a, b) {
+    var c = a._pack_next;
+    a._pack_next = b;
+    b._pack_prev = a;
+    b._pack_next = c;
+    c._pack_prev = b;
+  }
+  function d3_layout_packSplice(a, b) {
+    a._pack_next = b;
+    b._pack_prev = a;
+  }
+  function d3_layout_packIntersects(a, b) {
+    var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;
+    return .999 * dr * dr > dx * dx + dy * dy;
+  }
+  function d3_layout_packSiblings(node) {
+    if (!(nodes = node.children) || !(n = nodes.length)) return;
+    var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
+    function bound(node) {
+      xMin = Math.min(node.x - node.r, xMin);
+      xMax = Math.max(node.x + node.r, xMax);
+      yMin = Math.min(node.y - node.r, yMin);
+      yMax = Math.max(node.y + node.r, yMax);
+    }
+    nodes.forEach(d3_layout_packLink);
+    a = nodes[0];
+    a.x = -a.r;
+    a.y = 0;
+    bound(a);
+    if (n > 1) {
+      b = nodes[1];
+      b.x = b.r;
+      b.y = 0;
+      bound(b);
+      if (n > 2) {
+        c = nodes[2];
+        d3_layout_packPlace(a, b, c);
+        bound(c);
+        d3_layout_packInsert(a, c);
+        a._pack_prev = c;
+        d3_layout_packInsert(c, b);
+        b = a._pack_next;
+        for (i = 3; i < n; i++) {
+          d3_layout_packPlace(a, b, c = nodes[i]);
+          var isect = 0, s1 = 1, s2 = 1;
+          for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
+            if (d3_layout_packIntersects(j, c)) {
+              isect = 1;
+              break;
+            }
+          }
+          if (isect == 1) {
+            for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
+              if (d3_layout_packIntersects(k, c)) {
+                break;
+              }
+            }
+          }
+          if (isect) {
+            if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
+            i--;
+          } else {
+            d3_layout_packInsert(a, c);
+            b = c;
+            bound(c);
+          }
+        }
+      }
+    }
+    var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;
+    for (i = 0; i < n; i++) {
+      c = nodes[i];
+      c.x -= cx;
+      c.y -= cy;
+      cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));
+    }
+    node.r = cr;
+    nodes.forEach(d3_layout_packUnlink);
+  }
+  function d3_layout_packLink(node) {
+    node._pack_next = node._pack_prev = node;
+  }
+  function d3_layout_packUnlink(node) {
+    delete node._pack_next;
+    delete node._pack_prev;
+  }
+  function d3_layout_packTransform(node, x, y, k) {
+    var children = node.children;
+    node.x = x += k * node.x;
+    node.y = y += k * node.y;
+    node.r *= k;
+    if (children) {
+      var i = -1, n = children.length;
+      while (++i < n) d3_layout_packTransform(children[i], x, y, k);
+    }
+  }
+  function d3_layout_packPlace(a, b, c) {
+    var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;
+    if (db && (dx || dy)) {
+      var da = b.r + c.r, dc = dx * dx + dy * dy;
+      da *= da;
+      db *= db;
+      var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
+      c.x = a.x + x * dx + y * dy;
+      c.y = a.y + x * dy - y * dx;
+    } else {
+      c.x = a.x + db;
+      c.y = a.y;
+    }
+  }
+  d3.layout.cluster = function() {
+    var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;
+    function cluster(d, i) {
+      var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0;
+      d3_layout_treeVisitAfter(root, function(node) {
+        var children = node.children;
+        if (children && children.length) {
+          node.x = d3_layout_clusterX(children);
+          node.y = d3_layout_clusterY(children);
+        } else {
+          node.x = previousNode ? x += separation(node, previousNode) : 0;
+          node.y = 0;
+          previousNode = node;
+        }
+      });
+      var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;
+      d3_layout_treeVisitAfter(root, nodeSize ? function(node) {
+        node.x = (node.x - root.x) * size[0];
+        node.y = (root.y - node.y) * size[1];
+      } : function(node) {
+        node.x = (node.x - x0) / (x1 - x0) * size[0];
+        node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];
+      });
+      return nodes;
+    }
+    cluster.separation = function(x) {
+      if (!arguments.length) return separation;
+      separation = x;
+      return cluster;
+    };
+    cluster.size = function(x) {
+      if (!arguments.length) return nodeSize ? null : size;
+      nodeSize = (size = x) == null;
+      return cluster;
+    };
+    cluster.nodeSize = function(x) {
+      if (!arguments.length) return nodeSize ? size : null;
+      nodeSize = (size = x) != null;
+      return cluster;
+    };
+    return d3_layout_hierarchyRebind(cluster, hierarchy);
+  };
+  function d3_layout_clusterY(children) {
+    return 1 + d3.max(children, function(child) {
+      return child.y;
+    });
+  }
+  function d3_layout_clusterX(children) {
+    return children.reduce(function(x, child) {
+      return x + child.x;
+    }, 0) / children.length;
+  }
+  function d3_layout_clusterLeft(node) {
+    var children = node.children;
+    return children && children.length ? d3_layout_clusterLeft(children[0]) : node;
+  }
+  function d3_layout_clusterRight(node) {
+    var children = node.children, n;
+    return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;
+  }
+  d3.layout.treemap = function() {
+    var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
+    function scale(children, k) {
+      var i = -1, n = children.length, child, area;
+      while (++i < n) {
+        area = (child = children[i]).value * (k < 0 ? 0 : k);
+        child.area = isNaN(area) || area <= 0 ? 0 : area;
+      }
+    }
+    function squarify(node) {
+      var children = node.children;
+      if (children && children.length) {
+        var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === "slice" ? rect.dx : mode === "dice" ? rect.dy : mode === "slice-dice" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n;
+        scale(remaining, rect.dx * rect.dy / node.value);
+        row.area = 0;
+        while ((n = remaining.length) > 0) {
+          row.push(child = remaining[n - 1]);
+          row.area += child.area;
+          if (mode !== "squarify" || (score = worst(row, u)) <= best) {
+            remaining.pop();
+            best = score;
+          } else {
+            row.area -= row.pop().area;
+            position(row, u, rect, false);
+            u = Math.min(rect.dx, rect.dy);
+            row.length = row.area = 0;
+            best = Infinity;
+          }
+        }
+        if (row.length) {
+          position(row, u, rect, true);
+          row.length = row.area = 0;
+        }
+        children.forEach(squarify);
+      }
+    }
+    function stickify(node) {
+      var children = node.children;
+      if (children && children.length) {
+        var rect = pad(node), remaining = children.slice(), child, row = [];
+        scale(remaining, rect.dx * rect.dy / node.value);
+        row.area = 0;
+        while (child = remaining.pop()) {
+          row.push(child);
+          row.area += child.area;
+          if (child.z != null) {
+            position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);
+            row.length = row.area = 0;
+          }
+        }
+        children.forEach(stickify);
+      }
+    }
+    function worst(row, u) {
+      var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;
+      while (++i < n) {
+        if (!(r = row[i].area)) continue;
+        if (r < rmin) rmin = r;
+        if (r > rmax) rmax = r;
+      }
+      s *= s;
+      u *= u;
+      return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;
+    }
+    function position(row, u, rect, flush) {
+      var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
+      if (u == rect.dx) {
+        if (flush || v > rect.dy) v = rect.dy;
+        while (++i < n) {
+          o = row[i];
+          o.x = x;
+          o.y = y;
+          o.dy = v;
+          x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);
+        }
+        o.z = true;
+        o.dx += rect.x + rect.dx - x;
+        rect.y += v;
+        rect.dy -= v;
+      } else {
+        if (flush || v > rect.dx) v = rect.dx;
+        while (++i < n) {
+          o = row[i];
+          o.x = x;
+          o.y = y;
+          o.dx = v;
+          y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);
+        }
+        o.z = false;
+        o.dy += rect.y + rect.dy - y;
+        rect.x += v;
+        rect.dx -= v;
+      }
+    }
+    function treemap(d) {
+      var nodes = stickies || hierarchy(d), root = nodes[0];
+      root.x = 0;
+      root.y = 0;
+      root.dx = size[0];
+      root.dy = size[1];
+      if (stickies) hierarchy.revalue(root);
+      scale([ root ], root.dx * root.dy / root.value);
+      (stickies ? stickify : squarify)(root);
+      if (sticky) stickies = nodes;
+      return nodes;
+    }
+    treemap.size = function(x) {
+      if (!arguments.length) return size;
+      size = x;
+      return treemap;
+    };
+    treemap.padding = function(x) {
+      if (!arguments.length) return padding;
+      function padFunction(node) {
+        var p = x.call(treemap, node, node.depth);
+        return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p);
+      }
+      function padConstant(node) {
+        return d3_layout_treemapPad(node, x);
+      }
+      var type;
+      pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ],
+      padConstant) : padConstant;
+      return treemap;
+    };
+    treemap.round = function(x) {
+      if (!arguments.length) return round != Number;
+      round = x ? Math.round : Number;
+      return treemap;
+    };
+    treemap.sticky = function(x) {
+      if (!arguments.length) return sticky;
+      sticky = x;
+      stickies = null;
+      return treemap;
+    };
+    treemap.ratio = function(x) {
+      if (!arguments.length) return ratio;
+      ratio = x;
+      return treemap;
+    };
+    treemap.mode = function(x) {
+      if (!arguments.length) return mode;
+      mode = x + "";
+      return treemap;
+    };
+    return d3_layout_hierarchyRebind(treemap, hierarchy);
+  };
+  function d3_layout_treemapPadNull(node) {
+    return {
+      x: node.x,
+      y: node.y,
+      dx: node.dx,
+      dy: node.dy
+    };
+  }
+  function d3_layout_treemapPad(node, padding) {
+    var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];
+    if (dx < 0) {
+      x += dx / 2;
+      dx = 0;
+    }
+    if (dy < 0) {
+      y += dy / 2;
+      dy = 0;
+    }
+    return {
+      x: x,
+      y: y,
+      dx: dx,
+      dy: dy
+    };
+  }
+  d3.random = {
+    normal: function(µ, σ) {
+      var n = arguments.length;
+      if (n < 2) σ = 1;
+      if (n < 1) µ = 0;
+      return function() {
+        var x, y, r;
+        do {
+          x = Math.random() * 2 - 1;
+          y = Math.random() * 2 - 1;
+          r = x * x + y * y;
+        } while (!r || r > 1);
+        return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);
+      };
+    },
+    logNormal: function() {
+      var random = d3.random.normal.apply(d3, arguments);
+      return function() {
+        return Math.exp(random());
+      };
+    },
+    irwinHall: function(m) {
+      return function() {
+        for (var s = 0, j = 0; j < m; j++) s += Math.random();
+        return s / m;
+      };
+    }
+  };
+  d3.scale = {};
+  function d3_scaleExtent(domain) {
+    var start = domain[0], stop = domain[domain.length - 1];
+    return start < stop ? [ start, stop ] : [ stop, start ];
+  }
+  function d3_scaleRange(scale) {
+    return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());
+  }
+  function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
+    var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);
+    return function(x) {
+      return i(u(x));
+    };
+  }
+  function d3_scale_nice(domain, nice) {
+    var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;
+    if (x1 < x0) {
+      dx = i0, i0 = i1, i1 = dx;
+      dx = x0, x0 = x1, x1 = dx;
+    }
+    domain[i0] = nice.floor(x0);
+    domain[i1] = nice.ceil(x1);
+    return domain;
+  }
+  function d3_scale_niceStep(step) {
+    return step ? {
+      floor: function(x) {
+        return Math.floor(x / step) * step;
+      },
+      ceil: function(x) {
+        return Math.ceil(x / step) * step;
+      }
+    } : d3_scale_niceIdentity;
+  }
+  var d3_scale_niceIdentity = {
+    floor: d3_identity,
+    ceil: d3_identity
+  };
+  function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
+    var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;
+    if (domain[k] < domain[0]) {
+      domain = domain.slice().reverse();
+      range = range.slice().reverse();
+    }
+    while (++j <= k) {
+      u.push(uninterpolate(domain[j - 1], domain[j]));
+      i.push(interpolate(range[j - 1], range[j]));
+    }
+    return function(x) {
+      var j = d3.bisect(domain, x, 1, k) - 1;
+      return i[j](u[j](x));
+    };
+  }
+  d3.scale.linear = function() {
+    return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false);
+  };
+  function d3_scale_linear(domain, range, interpolate, clamp) {
+    var output, input;
+    function rescale() {
+      var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
+      output = linear(domain, range, uninterpolate, interpolate);
+      input = linear(range, domain, uninterpolate, d3_interpolate);
+      return scale;
+    }
+    function scale(x) {
+      return output(x);
+    }
+    scale.invert = function(y) {
+      return input(y);
+    };
+    scale.domain = function(x) {
+      if (!arguments.length) return domain;
+      domain = x.map(Number);
+      return rescale();
+    };
+    scale.range = function(x) {
+      if (!arguments.length) return range;
+      range = x;
+      return rescale();
+    };
+    scale.rangeRound = function(x) {
+      return scale.range(x).interpolate(d3_interpolateRound);
+    };
+    scale.clamp = function(x) {
+      if (!arguments.length) return clamp;
+      clamp = x;
+      return rescale();
+    };
+    scale.interpolate = function(x) {
+      if (!arguments.length) return interpolate;
+      interpolate = x;
+      return rescale();
+    };
+    scale.ticks = function(m) {
+      return d3_scale_linearTicks(domain, m);
+    };
+    scale.tickFormat = function(m, format) {
+      return d3_scale_linearTickFormat(domain, m, format);
+    };
+    scale.nice = function(m) {
+      d3_scale_linearNice(domain, m);
+      return rescale();
+    };
+    scale.copy = function() {
+      return d3_scale_linear(domain, range, interpolate, clamp);
+    };
+    return rescale();
+  }
+  function d3_scale_linearRebind(scale, linear) {
+    return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
+  }
+  function d3_scale_linearNice(domain, m) {
+    return d3_scale_nice(domain, d3_scale_niceStep(m ? d3_scale_linearTickRange(domain, m)[2] : d3_scale_linearNiceStep(domain)));
+  }
+  function d3_scale_linearNiceStep(domain) {
+    var extent = d3_scaleExtent(domain), span = extent[1] - extent[0];
+    return Math.pow(10, Math.round(Math.log(span) / Math.LN10) - 1);
+  }
+  function d3_scale_linearTickRange(domain, m) {
+    var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;
+    if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;
+    extent[0] = Math.ceil(extent[0] / step) * step;
+    extent[1] = Math.floor(extent[1] / step) * step + step * .5;
+    extent[2] = step;
+    return extent;
+  }
+  function d3_scale_linearTicks(domain, m) {
+    return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
+  }
+  function d3_scale_linearTickFormat(domain, m, format) {
+    var precision = -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01);
+    return d3.format(format ? format.replace(d3_format_re, function(a, b, c, d, e, f, g, h, i, j) {
+      return [ b, c, d, e, f, g, h, i || "." + (precision - (j === "%") * 2), j ].join("");
+    }) : ",." + precision + "f");
+  }
+  d3.scale.log = function() {
+    return d3_scale_log(d3.scale.linear().domain([ 0, 1 ]), 10, true, [ 1, 10 ]);
+  };
+  function d3_scale_log(linear, base, positive, domain) {
+    function log(x) {
+      return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base);
+    }
+    function pow(x) {
+      return positive ? Math.pow(base, x) : -Math.pow(base, -x);
+    }
+    function scale(x) {
+      return linear(log(x));
+    }
+    scale.invert = function(x) {
+      return pow(linear.invert(x));
+    };
+    scale.domain = function(x) {
+      if (!arguments.length) return domain;
+      positive = x[0] >= 0;
+      linear.domain((domain = x.map(Number)).map(log));
+      return scale;
+    };
+    scale.base = function(_) {
+      if (!arguments.length) return base;
+      base = +_;
+      linear.domain(domain.map(log));
+      return scale;
+    };
+    scale.nice = function() {
+      var niced = d3_scale_nice(domain.map(log), positive ? Math : d3_scale_logNiceNegative);
+      linear.domain(niced);
+      domain = niced.map(pow);
+      return scale;
+    };
+    scale.ticks = function() {
+      var extent = d3_scaleExtent(domain), ticks = [];
+      if (extent.every(isFinite)) {
+        var u = extent[0], v = extent[1], i = Math.floor(log(u)), j = Math.ceil(log(v)), n = base % 1 ? 2 : base;
+        if (positive) {
+          for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(pow(i) * k);
+          ticks.push(pow(i));
+        } else {
+          ticks.push(pow(i));
+          for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(pow(i) * k);
+        }
+        for (i = 0; ticks[i] < u; i++) {}
+        for (j = ticks.length; ticks[j - 1] > v; j--) {}
+        ticks = ticks.slice(i, j);
+      }
+      return ticks;
+    };
+    scale.tickFormat = function(n, format) {
+      if (!arguments.length) return d3_scale_logFormat;
+      if (arguments.length < 2) format = d3_scale_logFormat; else if (typeof format !== "function") format = d3.format(format);
+      var k = Math.max(.1, n / scale.ticks().length), f = positive ? (e = 1e-12, Math.ceil) : (e = -1e-12,
+      Math.floor), e;
+      return function(d) {
+        return d / pow(f(log(d) + e)) <= k ? format(d) : "";
+      };
+    };
+    scale.copy = function() {
+      return d3_scale_log(linear.copy(), base, positive, domain);
+    };
+    return d3_scale_linearRebind(scale, linear);
+  }
+  var d3_scale_logFormat = d3.format(".0e"), d3_scale_logNiceNegative = {
+    floor: function(x) {
+      return -Math.ceil(-x);
+    },
+    ceil: function(x) {
+      return -Math.floor(-x);
+    }
+  };
+  d3.scale.pow = function() {
+    return d3_scale_pow(d3.scale.linear(), 1, [ 0, 1 ]);
+  };
+  function d3_scale_pow(linear, exponent, domain) {
+    var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);
+    function scale(x) {
+      return linear(powp(x));
+    }
+    scale.invert = function(x) {
+      return powb(linear.invert(x));
+    };
+    scale.domain = function(x) {
+      if (!arguments.length) return domain;
+      linear.domain((domain = x.map(Number)).map(powp));
+      return scale;
+    };
+    scale.ticks = function(m) {
+      return d3_scale_linearTicks(domain, m);
+    };
+    scale.tickFormat = function(m, format) {
+      return d3_scale_linearTickFormat(domain, m, format);
+    };
+    scale.nice = function(m) {
+      return scale.domain(d3_scale_linearNice(domain, m));
+    };
+    scale.exponent = function(x) {
+      if (!arguments.length) return exponent;
+      powp = d3_scale_powPow(exponent = x);
+      powb = d3_scale_powPow(1 / exponent);
+      linear.domain(domain.map(powp));
+      return scale;
+    };
+    scale.copy = function() {
+      return d3_scale_pow(linear.copy(), exponent, domain);
+    };
+    return d3_scale_linearRebind(scale, linear);
+  }
+  function d3_scale_powPow(e) {
+    return function(x) {
+      return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
+    };
+  }
+  d3.scale.sqrt = function() {
+    return d3.scale.pow().exponent(.5);
+  };
+  d3.scale.ordinal = function() {
+    return d3_scale_ordinal([], {
+      t: "range",
+      a: [ [] ]
+    });
+  };
+  function d3_scale_ordinal(domain, ranger) {
+    var index, range, rangeBand;
+    function scale(x) {
+      return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length];
+    }
+    function steps(start, step) {
+      return d3.range(domain.length).map(function(i) {
+        return start + step * i;
+      });
+    }
+    scale.domain = function(x) {
+      if (!arguments.length) return domain;
+      domain = [];
+      index = new d3_Map();
+      var i = -1, n = x.length, xi;
+      while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));
+      return scale[ranger.t].apply(scale, ranger.a);
+    };
+    scale.range = function(x) {
+      if (!arguments.length) return range;
+      range = x;
+      rangeBand = 0;
+      ranger = {
+        t: "range",
+        a: arguments
+      };
+      return scale;
+    };
+    scale.rangePoints = function(x, padding) {
+      if (arguments.length < 2) padding = 0;
+      var start = x[0], stop = x[1], step = (stop - start) / (Math.max(1, domain.length - 1) + padding);
+      range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step);
+      rangeBand = 0;
+      ranger = {
+        t: "rangePoints",
+        a: arguments
+      };
+      return scale;
+    };
+    scale.rangeBands = function(x, padding, outerPadding) {
+      if (arguments.length < 2) padding = 0;
+      if (arguments.length < 3) outerPadding = padding;
+      var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);
+      range = steps(start + step * outerPadding, step);
+      if (reverse) range.reverse();
+      rangeBand = step * (1 - padding);
+      ranger = {
+        t: "rangeBands",
+        a: arguments
+      };
+      return scale;
+    };
+    scale.rangeRoundBands = function(x, padding, outerPadding) {
+      if (arguments.length < 2) padding = 0;
+      if (arguments.length < 3) outerPadding = padding;
+      var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)), error = stop - start - (domain.length - padding) * step;
+      range = steps(start + Math.round(error / 2), step);
+      if (reverse) range.reverse();
+      rangeBand = Math.round(step * (1 - padding));
+      ranger = {
+        t: "rangeRoundBands",
+        a: arguments
+      };
+      return scale;
+    };
+    scale.rangeBand = function() {
+      return rangeBand;
+    };
+    scale.rangeExtent = function() {
+      return d3_scaleExtent(ranger.a[0]);
+    };
+    scale.copy = function() {
+      return d3_scale_ordinal(domain, ranger);
+    };
+    return scale.domain(domain);
+  }
+  d3.scale.category10 = function() {
+    return d3.scale.ordinal().range(d3_category10);
+  };
+  d3.scale.category20 = function() {
+    return d3.scale.ordinal().range(d3_category20);
+  };
+  d3.scale.category20b = function() {
+    return d3.scale.ordinal().range(d3_category20b);
+  };
+  d3.scale.category20c = function() {
+    return d3.scale.ordinal().range(d3_category20c);
+  };
+  var d3_category10 = [ 2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175 ].map(d3_rgbString);
+  var d3_category20 = [ 2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725 ].map(d3_rgbString);
+  var d3_category20b = [ 3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654 ].map(d3_rgbString);
+  var d3_category20c = [ 3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081 ].map(d3_rgbString);
+  d3.scale.quantile = function() {
+    return d3_scale_quantile([], []);
+  };
+  function d3_scale_quantile(domain, range) {
+    var thresholds;
+    function rescale() {
+      var k = 0, q = range.length;
+      thresholds = [];
+      while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
+      return scale;
+    }
+    function scale(x) {
+      if (!isNaN(x = +x)) return range[d3.bisect(thresholds, x)];
+    }
+    scale.domain = function(x) {
+      if (!arguments.length) return domain;
+      domain = x.filter(function(d) {
+        return !isNaN(d);
+      }).sort(d3.ascending);
+      return rescale();
+    };
+    scale.range = function(x) {
+      if (!arguments.length) return range;
+      range = x;
+      return rescale();
+    };
+    scale.quantiles = function() {
+      return thresholds;
+    };
+    scale.invertExtent = function(y) {
+      y = range.indexOf(y);
+      return y < 0 ? [ NaN, NaN ] : [ y > 0 ? thresholds[y - 1] : domain[0], y < thresholds.length ? thresholds[y] : domain[domain.length - 1] ];
+    };
+    scale.copy = function() {
+      return d3_scale_quantile(domain, range);
+    };
+    return rescale();
+  }
+  d3.scale.quantize = function() {
+    return d3_scale_quantize(0, 1, [ 0, 1 ]);
+  };
+  function d3_scale_quantize(x0, x1, range) {
+    var kx, i;
+    function scale(x) {
+      return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
+    }
+    function rescale() {
+      kx = range.length / (x1 - x0);
+      i = range.length - 1;
+      return scale;
+    }
+    scale.domain = function(x) {
+      if (!arguments.length) return [ x0, x1 ];
+      x0 = +x[0];
+      x1 = +x[x.length - 1];
+      return rescale();
+    };
+    scale.range = function(x) {
+      if (!arguments.length) return range;
+      range = x;
+      return rescale();
+    };
+    scale.invertExtent = function(y) {
+      y = range.indexOf(y);
+      y = y < 0 ? NaN : y / kx + x0;
+      return [ y, y + 1 / kx ];
+    };
+    scale.copy = function() {
+      return d3_scale_quantize(x0, x1, range);
+    };
+    return rescale();
+  }
+  d3.scale.threshold = function() {
+    return d3_scale_threshold([ .5 ], [ 0, 1 ]);
+  };
+  function d3_scale_threshold(domain, range) {
+    function scale(x) {
+      if (x <= x) return range[d3.bisect(domain, x)];
+    }
+    scale.domain = function(_) {
+      if (!arguments.length) return domain;
+      domain = _;
+      return scale;
+    };
+    scale.range = function(_) {
+      if (!arguments.length) return range;
+      range = _;
+      return scale;
+    };
+    scale.invertExtent = function(y) {
+      y = range.indexOf(y);
+      return [ domain[y - 1], domain[y] ];
+    };
+    scale.copy = function() {
+      return d3_scale_threshold(domain, range);
+    };
+    return scale;
+  }
+  d3.scale.identity = function() {
+    return d3_scale_identity([ 0, 1 ]);
+  };
+  function d3_scale_identity(domain) {
+    function identity(x) {
+      return +x;
+    }
+    identity.invert = identity;
+    identity.domain = identity.range = function(x) {
+      if (!arguments.length) return domain;
+      domain = x.map(identity);
+      return identity;
+    };
+    identity.ticks = function(m) {
+      return d3_scale_linearTicks(domain, m);
+    };
+    identity.tickFormat = function(m, format) {
+      return d3_scale_linearTickFormat(domain, m, format);
+    };
+    identity.copy = function() {
+      return d3_scale_identity(domain);
+    };
+    return identity;
+  }
+  d3.svg.arc = function() {
+    var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
+    function arc() {
+      var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0,
+      a0 = a1, a1 = da), a1 - a0), df = da < π ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1);
+      return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
+    }
+    arc.innerRadius = function(v) {
+      if (!arguments.length) return innerRadius;
+      innerRadius = d3_functor(v);
+      return arc;
+    };
+    arc.outerRadius = function(v) {
+      if (!arguments.length) return outerRadius;
+      outerRadius = d3_functor(v);
+      return arc;
+    };
+    arc.startAngle = function(v) {
+      if (!arguments.length) return startAngle;
+      startAngle = d3_functor(v);
+      return arc;
+    };
+    arc.endAngle = function(v) {
+      if (!arguments.length) return endAngle;
+      endAngle = d3_functor(v);
+      return arc;
+    };
+    arc.centroid = function() {
+      var r = (innerRadius.apply(this, arguments) + outerRadius.apply(this, arguments)) / 2, a = (startAngle.apply(this, arguments) + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
+      return [ Math.cos(a) * r, Math.sin(a) * r ];
+    };
+    return arc;
+  };
+  var d3_svg_arcOffset = -π / 2, d3_svg_arcMax = 2 * π - 1e-6;
+  function d3_svg_arcInnerRadius(d) {
+    return d.innerRadius;
+  }
+  function d3_svg_arcOuterRadius(d) {
+    return d.outerRadius;
+  }
+  function d3_svg_arcStartAngle(d) {
+    return d.startAngle;
+  }
+  function d3_svg_arcEndAngle(d) {
+    return d.endAngle;
+  }
+  d3.svg.line.radial = function() {
+    var line = d3_svg_line(d3_svg_lineRadial);
+    line.radius = line.x, delete line.x;
+    line.angle = line.y, delete line.y;
+    return line;
+  };
+  function d3_svg_lineRadial(points) {
+    var point, i = -1, n = points.length, r, a;
+    while (++i < n) {
+      point = points[i];
+      r = point[0];
+      a = point[1] + d3_svg_arcOffset;
+      point[0] = r * Math.cos(a);
+      point[1] = r * Math.sin(a);
+    }
+    return points;
+  }
+  function d3_svg_area(projection) {
+    var x0 = d3_svg_lineX, x1 = d3_svg_lineX, y0 = 0, y1 = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
+    function area(data) {
+      var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
+        return x;
+      } : d3_functor(x1), fy1 = y0 === y1 ? function() {
+        return y;
+      } : d3_functor(y1), x, y;
+      function segment() {
+        segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z");
+      }
+      while (++i < n) {
+        if (defined.call(this, d = data[i], i)) {
+          points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);
+          points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);
+        } else if (points0.length) {
+          segment();
+          points0 = [];
+          points1 = [];
+        }
+      }
+      if (points0.length) segment();
+      return segments.length ? segments.join("") : null;
+    }
+    area.x = function(_) {
+      if (!arguments.length) return x1;
+      x0 = x1 = _;
+      return area;
+    };
+    area.x0 = function(_) {
+      if (!arguments.length) return x0;
+      x0 = _;
+      return area;
+    };
+    area.x1 = function(_) {
+      if (!arguments.length) return x1;
+      x1 = _;
+      return area;
+    };
+    area.y = function(_) {
+      if (!arguments.length) return y1;
+      y0 = y1 = _;
+      return area;
+    };
+    area.y0 = function(_) {
+      if (!arguments.length) return y0;
+      y0 = _;
+      return area;
+    };
+    area.y1 = function(_) {
+      if (!arguments.length) return y1;
+      y1 = _;
+      return area;
+    };
+    area.defined = function(_) {
+      if (!arguments.length) return defined;
+      defined = _;
+      return area;
+    };
+    area.interpolate = function(_) {
+      if (!arguments.length) return interpolateKey;
+      if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
+      interpolateReverse = interpolate.reverse || interpolate;
+      L = interpolate.closed ? "M" : "L";
+      return area;
+    };
+    area.tension = function(_) {
+      if (!arguments.length) return tension;
+      tension = _;
+      return area;
+    };
+    return area;
+  }
+  d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
+  d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
+  d3.svg.area = function() {
+    return d3_svg_area(d3_identity);
+  };
+  d3.svg.area.radial = function() {
+    var area = d3_svg_area(d3_svg_lineRadial);
+    area.radius = area.x, delete area.x;
+    area.innerRadius = area.x0, delete area.x0;
+    area.outerRadius = area.x1, delete area.x1;
+    area.angle = area.y, delete area.y;
+    area.startAngle = area.y0, delete area.y0;
+    area.endAngle = area.y1, delete area.y1;
+    return area;
+  };
+  d3.svg.chord = function() {
+    var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
+    function chord(d, i) {
+      var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
+      return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
+    }
+    function subgroup(self, f, d, i) {
+      var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
+      return {
+        r: r,
+        a0: a0,
+        a1: a1,
+        p0: [ r * Math.cos(a0), r * Math.sin(a0) ],
+        p1: [ r * Math.cos(a1), r * Math.sin(a1) ]
+      };
+    }
+    function equals(a, b) {
+      return a.a0 == b.a0 && a.a1 == b.a1;
+    }
+    function arc(r, p, a) {
+      return "A" + r + "," + r + " 0 " + +(a > π) + ",1 " + p;
+    }
+    function curve(r0, p0, r1, p1) {
+      return "Q 0,0 " + p1;
+    }
+    chord.radius = function(v) {
+      if (!arguments.length) return radius;
+      radius = d3_functor(v);
+      return chord;
+    };
+    chord.source = function(v) {
+      if (!arguments.length) return source;
+      source = d3_functor(v);
+      return chord;
+    };
+    chord.target = function(v) {
+      if (!arguments.length) return target;
+      target = d3_functor(v);
+      return chord;
+    };
+    chord.startAngle = function(v) {
+      if (!arguments.length) return startAngle;
+      startAngle = d3_functor(v);
+      return chord;
+    };
+    chord.endAngle = function(v) {
+      if (!arguments.length) return endAngle;
+      endAngle = d3_functor(v);
+      return chord;
+    };
+    return chord;
+  };
+  function d3_svg_chordRadius(d) {
+    return d.radius;
+  }
+  d3.svg.diagonal = function() {
+    var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;
+    function diagonal(d, i) {
+      var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
+        x: p0.x,
+        y: m
+      }, {
+        x: p3.x,
+        y: m
+      }, p3 ];
+      p = p.map(projection);
+      return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
+    }
+    diagonal.source = function(x) {
+      if (!arguments.length) return source;
+      source = d3_functor(x);
+      return diagonal;
+    };
+    diagonal.target = function(x) {
+      if (!arguments.length) return target;
+      target = d3_functor(x);
+      return diagonal;
+    };
+    diagonal.projection = function(x) {
+      if (!arguments.length) return projection;
+      projection = x;
+      return diagonal;
+    };
+    return diagonal;
+  };
+  function d3_svg_diagonalProjection(d) {
+    return [ d.x, d.y ];
+  }
+  d3.svg.diagonal.radial = function() {
+    var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;
+    diagonal.projection = function(x) {
+      return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;
+    };
+    return diagonal;
+  };
+  function d3_svg_diagonalRadialProjection(projection) {
+    return function() {
+      var d = projection.apply(this, arguments), r = d[0], a = d[1] + d3_svg_arcOffset;
+      return [ r * Math.cos(a), r * Math.sin(a) ];
+    };
+  }
+  d3.svg.symbol = function() {
+    var type = d3_svg_symbolType, size = d3_svg_symbolSize;
+    function symbol(d, i) {
+      return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));
+    }
+    symbol.type = function(x) {
+      if (!arguments.length) return type;
+      type = d3_functor(x);
+      return symbol;
+    };
+    symbol.size = function(x) {
+      if (!arguments.length) return size;
+      size = d3_functor(x);
+      return symbol;
+    };
+    return symbol;
+  };
+  function d3_svg_symbolSize() {
+    return 64;
+  }
+  function d3_svg_symbolType() {
+    return "circle";
+  }
+  function d3_svg_symbolCircle(size) {
+    var r = Math.sqrt(size / π);
+    return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
+  }
+  var d3_svg_symbols = d3.map({
+    circle: d3_svg_symbolCircle,
+    cross: function(size) {
+      var r = Math.sqrt(size / 5) / 2;
+      return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z";
+    },
+    diamond: function(size) {
+      var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;
+      return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z";
+    },
+    square: function(size) {
+      var r = Math.sqrt(size) / 2;
+      return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z";
+    },
+    "triangle-down": function(size) {
+      var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
+      return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z";
+    },
+    "triangle-up": function(size) {
+      var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
+      return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z";
+    }
+  });
+  d3.svg.symbolTypes = d3_svg_symbols.keys();
+  var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians);
+  function d3_transition(groups, id) {
+    d3_subclass(groups, d3_transitionPrototype);
+    groups.id = id;
+    return groups;
+  }
+  var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit;
+  d3_transitionPrototype.call = d3_selectionPrototype.call;
+  d3_transitionPrototype.empty = d3_selectionPrototype.empty;
+  d3_transitionPrototype.node = d3_selectionPrototype.node;
+  d3_transitionPrototype.size = d3_selectionPrototype.size;
+  d3.transition = function(selection) {
+    return arguments.length ? d3_transitionInheritId ? selection.transition() : selection : d3_selectionRoot.transition();
+  };
+  d3.transition.prototype = d3_transitionPrototype;
+  d3_transitionPrototype.select = function(selector) {
+    var id = this.id, subgroups = [], subgroup, subnode, node;
+    selector = d3_selection_selector(selector);
+    for (var j = -1, m = this.length; ++j < m; ) {
+      subgroups.push(subgroup = []);
+      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+        if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) {
+          if ("__data__" in node) subnode.__data__ = node.__data__;
+          d3_transitionNode(subnode, i, id, node.__transition__[id]);
+          subgroup.push(subnode);
+        } else {
+          subgroup.push(null);
+        }
+      }
+    }
+    return d3_transition(subgroups, id);
+  };
+  d3_transitionPrototype.selectAll = function(selector) {
+    var id = this.id, subgroups = [], subgroup, subnodes, node, subnode, transition;
+    selector = d3_selection_selectorAll(selector);
+    for (var j = -1, m = this.length; ++j < m; ) {
+      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+        if (node = group[i]) {
+          transition = node.__transition__[id];
+          subnodes = selector.call(node, node.__data__, i, j);
+          subgroups.push(subgroup = []);
+          for (var k = -1, o = subnodes.length; ++k < o; ) {
+            if (subnode = subnodes[k]) d3_transitionNode(subnode, k, id, transition);
+            subgroup.push(subnode);
+          }
+        }
+      }
+    }
+    return d3_transition(subgroups, id);
+  };
+  d3_transitionPrototype.filter = function(filter) {
+    var subgroups = [], subgroup, group, node;
+    if (typeof filter !== "function") filter = d3_selection_filter(filter);
+    for (var j = 0, m = this.length; j < m; j++) {
+      subgroups.push(subgroup = []);
+      for (var group = this[j], i = 0, n = group.length; i < n; i++) {
+        if ((node = group[i]) && filter.call(node, node.__data__, i)) {
+          subgroup.push(node);
+        }
+      }
+    }
+    return d3_transition(subgroups, this.id);
+  };
+  d3_transitionPrototype.tween = function(name, tween) {
+    var id = this.id;
+    if (arguments.length < 2) return this.node().__transition__[id].tween.get(name);
+    return d3_selection_each(this, tween == null ? function(node) {
+      node.__transition__[id].tween.remove(name);
+    } : function(node) {
+      node.__transition__[id].tween.set(name, tween);
+    });
+  };
+  function d3_transition_tween(groups, name, value, tween) {
+    var id = groups.id;
+    return d3_selection_each(groups, typeof value === "function" ? function(node, i, j) {
+      node.__transition__[id].tween.set(name, tween(value.call(node, node.__data__, i, j)));
+    } : (value = tween(value), function(node) {
+      node.__transition__[id].tween.set(name, value);
+    }));
+  }
+  d3_transitionPrototype.attr = function(nameNS, value) {
+    if (arguments.length < 2) {
+      for (value in nameNS) this.attr(value, nameNS[value]);
+      return this;
+    }
+    var interpolate = nameNS == "transform" ? d3_interpolateTransform : d3_interpolate, name = d3.ns.qualify(nameNS);
+    function attrNull() {
+      this.removeAttribute(name);
+    }
+    function attrNullNS() {
+      this.removeAttributeNS(name.space, name.local);
+    }
+    function attrTween(b) {
+      return b == null ? attrNull : (b += "", function() {
+        var a = this.getAttribute(name), i;
+        return a !== b && (i = interpolate(a, b), function(t) {
+          this.setAttribute(name, i(t));
+        });
+      });
+    }
+    function attrTweenNS(b) {
+      return b == null ? attrNullNS : (b += "", function() {
+        var a = this.getAttributeNS(name.space, name.local), i;
+        return a !== b && (i = interpolate(a, b), function(t) {
+          this.setAttributeNS(name.space, name.local, i(t));
+        });
+      });
+    }
+    return d3_transition_tween(this, "attr." + nameNS, value, name.local ? attrTweenNS : attrTween);
+  };
+  d3_transitionPrototype.attrTween = function(nameNS, tween) {
+    var name = d3.ns.qualify(nameNS);
+    function attrTween(d, i) {
+      var f = tween.call(this, d, i, this.getAttribute(name));
+      return f && function(t) {
+        this.setAttribute(name, f(t));
+      };
+    }
+    function attrTweenNS(d, i) {
+      var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
+      return f && function(t) {
+        this.setAttributeNS(name.space, name.local, f(t));
+      };
+    }
+    return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween);
+  };
+  d3_transitionPrototype.style = function(name, value, priority) {
+    var n = arguments.length;
+    if (n < 3) {
+      if (typeof name !== "string") {
+        if (n < 2) value = "";
+        for (priority in name) this.style(priority, name[priority], value);
+        return this;
+      }
+      priority = "";
+    }
+    function styleNull() {
+      this.style.removeProperty(name);
+    }
+    function styleString(b) {
+      return b == null ? styleNull : (b += "", function() {
+        var a = d3_window.getComputedStyle(this, null).getPropertyValue(name), i;
+        return a !== b && (i = d3_interpolate(a, b), function(t) {
+          this.style.setProperty(name, i(t), priority);
+        });
+      });
+    }
+    return d3_transition_tween(this, "style." + name, value, styleString);
+  };
+  d3_transitionPrototype.styleTween = function(name, tween, priority) {
+    if (arguments.length < 3) priority = "";
+    function styleTween(d, i) {
+      var f = tween.call(this, d, i, d3_window.getComputedStyle(this, null).getPropertyValue(name));
+      return f && function(t) {
+        this.style.setProperty(name, f(t), priority);
+      };
+    }
+    return this.tween("style." + name, styleTween);
+  };
+  d3_transitionPrototype.text = function(value) {
+    return d3_transition_tween(this, "text", value, d3_transition_text);
+  };
+  function d3_transition_text(b) {
+    if (b == null) b = "";
+    return function() {
+      this.textContent = b;
+    };
+  }
+  d3_transitionPrototype.remove = function() {
+    return this.each("end.transition", function() {
+      var p;
+      if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this);
+    });
+  };
+  d3_transitionPrototype.ease = function(value) {
+    var id = this.id;
+    if (arguments.length < 1) return this.node().__transition__[id].ease;
+    if (typeof value !== "function") value = d3.ease.apply(d3, arguments);
+    return d3_selection_each(this, function(node) {
+      node.__transition__[id].ease = value;
+    });
+  };
+  d3_transitionPrototype.delay = function(value) {
+    var id = this.id;
+    return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
+      node.__transition__[id].delay = value.call(node, node.__data__, i, j) | 0;
+    } : (value |= 0, function(node) {
+      node.__transition__[id].delay = value;
+    }));
+  };
+  d3_transitionPrototype.duration = function(value) {
+    var id = this.id;
+    return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
+      node.__transition__[id].duration = Math.max(1, value.call(node, node.__data__, i, j) | 0);
+    } : (value = Math.max(1, value | 0), function(node) {
+      node.__transition__[id].duration = value;
+    }));
+  };
+  d3_transitionPrototype.each = function(type, listener) {
+    var id = this.id;
+    if (arguments.length < 2) {
+      var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId;
+      d3_transitionInheritId = id;
+      d3_selection_each(this, function(node, i, j) {
+        d3_transitionInherit = node.__transition__[id];
+        type.call(node, node.__data__, i, j);
+      });
+      d3_transitionInherit = inherit;
+      d3_transitionInheritId = inheritId;
+    } else {
+      d3_selection_each(this, function(node) {
+        var transition = node.__transition__[id];
+        (transition.event || (transition.event = d3.dispatch("start", "end"))).on(type, listener);
+      });
+    }
+    return this;
+  };
+  d3_transitionPrototype.transition = function() {
+    var id0 = this.id, id1 = ++d3_transitionId, subgroups = [], subgroup, group, node, transition;
+    for (var j = 0, m = this.length; j < m; j++) {
+      subgroups.push(subgroup = []);
+      for (var group = this[j], i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) {
+          transition = Object.create(node.__transition__[id0]);
+          transition.delay += transition.duration;
+          d3_transitionNode(node, i, id1, transition);
+        }
+        subgroup.push(node);
+      }
+    }
+    return d3_transition(subgroups, id1);
+  };
+  function d3_transitionNode(node, i, id, inherit) {
+    var lock = node.__transition__ || (node.__transition__ = {
+      active: 0,
+      count: 0
+    }), transition = lock[id];
+    if (!transition) {
+      var time = inherit.time;
+      transition = lock[id] = {
+        tween: new d3_Map(),
+        time: time,
+        ease: inherit.ease,
+        delay: inherit.delay,
+        duration: inherit.duration
+      };
+      ++lock.count;
+      d3.timer(function(elapsed) {
+        var d = node.__data__, ease = transition.ease, delay = transition.delay, duration = transition.duration, tweened = [];
+        if (delay <= elapsed) return start(elapsed);
+        d3_timer_replace(start, delay, time);
+        function start(elapsed) {
+          if (lock.active > id) return stop();
+          lock.active = id;
+          transition.event && transition.event.start.call(node, d, i);
+          transition.tween.forEach(function(key, value) {
+            if (value = value.call(node, d, i)) {
+              tweened.push(value);
+            }
+          });
+          if (tick(elapsed)) return 1;
+          d3_timer_replace(tick, 0, time);
+        }
+        function tick(elapsed) {
+          if (lock.active !== id) return stop();
+          var t = (elapsed - delay) / duration, e = ease(t), n = tweened.length;
+          while (n > 0) {
+            tweened[--n].call(node, e);
+          }
+          if (t >= 1) {
+            stop();
+            transition.event && transition.event.end.call(node, d, i);
+            return 1;
+          }
+        }
+        function stop() {
+          if (--lock.count) delete lock[id]; else delete node.__transition__;
+          return 1;
+        }
+      }, 0, time);
+    }
+  }
+  d3.svg.axis = function() {
+    var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_, tickSubdivide = 0;
+    function axis(g) {
+      g.each(function() {
+        var g = d3.select(this);
+        var ticks = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain() : tickValues, tickFormat = tickFormat_ == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String : tickFormat_;
+        var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide), subtick = g.selectAll(".tick.minor").data(subticks, String), subtickEnter = subtick.enter().insert("line", ".tick").attr("class", "tick minor").style("opacity", 1e-6), subtickExit = d3.transition(subtick.exit()).style("opacity", 1e-6).remove(), subtickUpdate = d3.transition(subtick).style("opacity", 1);
+        var tick = g.selectAll(".tick.major").data(ticks, String), tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick major").style("opacity", 1e-6), tickExit = d3.transition(tick.exit()).style("opacity", 1e-6).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform;
+        var range = d3_scaleRange(scale), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"), 
+        d3.transition(path));
+        var scale1 = scale.copy(), scale0 = this.__chart__ || scale1;
+        this.__chart__ = scale1;
+        tickEnter.append("line");
+        tickEnter.append("text");
+        var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text");
+        switch (orient) {
+         case "bottom":
+          {
+            tickTransform = d3_svg_axisX;
+            subtickEnter.attr("y2", tickMinorSize);
+            subtickUpdate.attr("x2", 0).attr("y2", tickMinorSize);
+            lineEnter.attr("y2", tickMajorSize);
+            textEnter.attr("y", Math.max(tickMajorSize, 0) + tickPadding);
+            lineUpdate.attr("x2", 0).attr("y2", tickMajorSize);
+            textUpdate.attr("x", 0).attr("y", Math.max(tickMajorSize, 0) + tickPadding);
+            text.attr("dy", ".71em").style("text-anchor", "middle");
+            pathUpdate.attr("d", "M" + range[0] + "," + tickEndSize + "V0H" + range[1] + "V" + tickEndSize);
+            break;
+          }
+
+         case "top":
+          {
+            tickTransform = d3_svg_axisX;
+            subtickEnter.attr("y2", -tickMinorSize);
+            subtickUpdate.attr("x2", 0).attr("y2", -tickMinorSize);
+            lineEnter.attr("y2", -tickMajorSize);
+            textEnter.attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
+            lineUpdate.attr("x2", 0).attr("y2", -tickMajorSize);
+            textUpdate.attr("x", 0).attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
+            text.attr("dy", "0em").style("text-anchor", "middle");
+            pathUpdate.attr("d", "M" + range[0] + "," + -tickEndSize + "V0H" + range[1] + "V" + -tickEndSize);
+            break;
+          }
+
+         case "left":
+          {
+            tickTransform = d3_svg_axisY;
+            subtickEnter.attr("x2", -tickMinorSize);
+            subtickUpdate.attr("x2", -tickMinorSize).attr("y2", 0);
+            lineEnter.attr("x2", -tickMajorSize);
+            textEnter.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding));
+            lineUpdate.attr("x2", -tickMajorSize).attr("y2", 0);
+            textUpdate.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding)).attr("y", 0);
+            text.attr("dy", ".32em").style("text-anchor", "end");
+            pathUpdate.attr("d", "M" + -tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + -tickEndSize);
+            break;
+          }
+
+         case "right":
+          {
+            tickTransform = d3_svg_axisY;
+            subtickEnter.attr("x2", tickMinorSize);
+            subtickUpdate.attr("x2", tickMinorSize).attr("y2", 0);
+            lineEnter.attr("x2", tickMajorSize);
+            textEnter.attr("x", Math.max(tickMajorSize, 0) + tickPadding);
+            lineUpdate.attr("x2", tickMajorSize).attr("y2", 0);
+            textUpdate.attr("x", Math.max(tickMajorSize, 0) + tickPadding).attr("y", 0);
+            text.attr("dy", ".32em").style("text-anchor", "start");
+            pathUpdate.attr("d", "M" + tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + tickEndSize);
+            break;
+          }
+        }
+        if (scale.rangeBand) {
+          var dx = scale1.rangeBand() / 2, x = function(d) {
+            return scale1(d) + dx;
+          };
+          tickEnter.call(tickTransform, x);
+          tickUpdate.call(tickTransform, x);
+        } else {
+          tickEnter.call(tickTransform, scale0);
+          tickUpdate.call(tickTransform, scale1);
+          tickExit.call(tickTransform, scale1);
+          subtickEnter.call(tickTransform, scale0);
+          subtickUpdate.call(tickTransform, scale1);
+          subtickExit.call(tickTransform, scale1);
+        }
+      });
+    }
+    axis.scale = function(x) {
+      if (!arguments.length) return scale;
+      scale = x;
+      return axis;
+    };
+    axis.orient = function(x) {
+      if (!arguments.length) return orient;
+      orient = x in d3_svg_axisOrients ? x + "" : d3_svg_axisDefaultOrient;
+      return axis;
+    };
+    axis.ticks = function() {
+      if (!arguments.length) return tickArguments_;
+      tickArguments_ = arguments;
+      return axis;
+    };
+    axis.tickValues = function(x) {
+      if (!arguments.length) return tickValues;
+      tickValues = x;
+      return axis;
+    };
+    axis.tickFormat = function(x) {
+      if (!arguments.length) return tickFormat_;
+      tickFormat_ = x;
+      return axis;
+    };
+    axis.tickSize = function(x, y) {
+      if (!arguments.length) return tickMajorSize;
+      var n = arguments.length - 1;
+      tickMajorSize = +x;
+      tickMinorSize = n > 1 ? +y : tickMajorSize;
+      tickEndSize = n > 0 ? +arguments[n] : tickMajorSize;
+      return axis;
+    };
+    axis.tickPadding = function(x) {
+      if (!arguments.length) return tickPadding;
+      tickPadding = +x;
+      return axis;
+    };
+    axis.tickSubdivide = function(x) {
+      if (!arguments.length) return tickSubdivide;
+      tickSubdivide = +x;
+      return axis;
+    };
+    return axis;
+  };
+  var d3_svg_axisDefaultOrient = "bottom", d3_svg_axisOrients = {
+    top: 1,
+    right: 1,
+    bottom: 1,
+    left: 1
+  };
+  function d3_svg_axisX(selection, x) {
+    selection.attr("transform", function(d) {
+      return "translate(" + x(d) + ",0)";
+    });
+  }
+  function d3_svg_axisY(selection, y) {
+    selection.attr("transform", function(d) {
+      return "translate(0," + y(d) + ")";
+    });
+  }
+  function d3_svg_axisSubdivide(scale, ticks, m) {
+    subticks = [];
+    if (m && ticks.length > 1) {
+      var extent = d3_scaleExtent(scale.domain()), subticks, i = -1, n = ticks.length, d = (ticks[1] - ticks[0]) / ++m, j, v;
+      while (++i < n) {
+        for (j = m; --j > 0; ) {
+          if ((v = +ticks[i] - j * d) >= extent[0]) {
+            subticks.push(v);
+          }
+        }
+      }
+      for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1]; ) {
+        subticks.push(v);
+      }
+    }
+    return subticks;
+  }
+  d3.svg.brush = function() {
+    var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, resizes = d3_svg_brushResizes[0], extent = [ [ 0, 0 ], [ 0, 0 ] ], clamp = [ true, true ], extentDomain;
+    function brush(g) {
+      g.each(function() {
+        var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
+        g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
+        bg.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
+        fg.enter().append("rect").attr("class", "extent").style("cursor", "move");
+        tz.enter().append("g").attr("class", function(d) {
+          return "resize " + d;
+        }).style("cursor", function(d) {
+          return d3_svg_brushCursor[d];
+        }).append("rect").attr("x", function(d) {
+          return /[ew]$/.test(d) ? -3 : null;
+        }).attr("y", function(d) {
+          return /^[ns]/.test(d) ? -3 : null;
+        }).attr("width", 6).attr("height", 6).style("visibility", "hidden");
+        tz.style("display", brush.empty() ? "none" : null);
+        tz.exit().remove();
+        if (x) {
+          e = d3_scaleRange(x);
+          bg.attr("x", e[0]).attr("width", e[1] - e[0]);
+          redrawX(g);
+        }
+        if (y) {
+          e = d3_scaleRange(y);
+          bg.attr("y", e[0]).attr("height", e[1] - e[0]);
+          redrawY(g);
+        }
+        redraw(g);
+      });
+    }
+    function redraw(g) {
+      g.selectAll(".resize").attr("transform", function(d) {
+        return "translate(" + extent[+/e$/.test(d)][0] + "," + extent[+/^s/.test(d)][1] + ")";
+      });
+    }
+    function redrawX(g) {
+      g.select(".extent").attr("x", extent[0][0]);
+      g.selectAll(".extent,.n>rect,.s>rect").attr("width", extent[1][0] - extent[0][0]);
+    }
+    function redrawY(g) {
+      g.select(".extent").attr("y", extent[0][1]);
+      g.selectAll(".extent,.e>rect,.w>rect").attr("height", extent[1][1] - extent[0][1]);
+    }
+    function brushstart() {
+      var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = mouse(), offset;
+      var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup);
+      if (d3.event.changedTouches) {
+        w.on("touchmove.brush", brushmove).on("touchend.brush", brushend);
+      } else {
+        w.on("mousemove.brush", brushmove).on("mouseup.brush", brushend);
+      }
+      if (dragging) {
+        origin[0] = extent[0][0] - origin[0];
+        origin[1] = extent[0][1] - origin[1];
+      } else if (resizing) {
+        var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);
+        offset = [ extent[1 - ex][0] - origin[0], extent[1 - ey][1] - origin[1] ];
+        origin[0] = extent[ex][0];
+        origin[1] = extent[ey][1];
+      } else if (d3.event.altKey) center = origin.slice();
+      g.style("pointer-events", "none").selectAll(".resize").style("display", null);
+      d3.select("body").style("cursor", eventTarget.style("cursor"));
+      event_({
+        type: "brushstart"
+      });
+      brushmove();
+      function mouse() {
+        var touches = d3.event.changedTouches;
+        return touches ? d3.touches(target, touches)[0] : d3.mouse(target);
+      }
+      function keydown() {
+        if (d3.event.keyCode == 32) {
+          if (!dragging) {
+            center = null;
+            origin[0] -= extent[1][0];
+            origin[1] -= extent[1][1];
+            dragging = 2;
+          }
+          d3_eventPreventDefault();
+        }
+      }
+      function keyup() {
+        if (d3.event.keyCode == 32 && dragging == 2) {
+          origin[0] += extent[1][0];
+          origin[1] += extent[1][1];
+          dragging = 0;
+          d3_eventPreventDefault();
+        }
+      }
+      function brushmove() {
+        var point = mouse(), moved = false;
+        if (offset) {
+          point[0] += offset[0];
+          point[1] += offset[1];
+        }
+        if (!dragging) {
+          if (d3.event.altKey) {
+            if (!center) center = [ (extent[0][0] + extent[1][0]) / 2, (extent[0][1] + extent[1][1]) / 2 ];
+            origin[0] = extent[+(point[0] < center[0])][0];
+            origin[1] = extent[+(point[1] < center[1])][1];
+          } else center = null;
+        }
+        if (resizingX && move1(point, x, 0)) {
+          redrawX(g);
+          moved = true;
+        }
+        if (resizingY && move1(point, y, 1)) {
+          redrawY(g);
+          moved = true;
+        }
+        if (moved) {
+          redraw(g);
+          event_({
+            type: "brush",
+            mode: dragging ? "move" : "resize"
+          });
+        }
+      }
+      function move1(point, scale, i) {
+        var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], size = extent[1][i] - extent[0][i], min, max;
+        if (dragging) {
+          r0 -= position;
+          r1 -= size + position;
+        }
+        min = clamp[i] ? Math.max(r0, Math.min(r1, point[i])) : point[i];
+        if (dragging) {
+          max = (min += position) + size;
+        } else {
+          if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));
+          if (position < min) {
+            max = min;
+            min = position;
+          } else {
+            max = position;
+          }
+        }
+        if (extent[0][i] !== min || extent[1][i] !== max) {
+          extentDomain = null;
+          extent[0][i] = min;
+          extent[1][i] = max;
+          return true;
+        }
+      }
+      function brushend() {
+        brushmove();
+        g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null);
+        d3.select("body").style("cursor", null);
+        w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null);
+        dragRestore();
+        event_({
+          type: "brushend"
+        });
+      }
+    }
+    brush.x = function(z) {
+      if (!arguments.length) return x;
+      x = z;
+      resizes = d3_svg_brushResizes[!x << 1 | !y];
+      return brush;
+    };
+    brush.y = function(z) {
+      if (!arguments.length) return y;
+      y = z;
+      resizes = d3_svg_brushResizes[!x << 1 | !y];
+      return brush;
+    };
+    brush.clamp = function(z) {
+      if (!arguments.length) return x && y ? clamp : x || y ? clamp[+!x] : null;
+      if (x && y) clamp = [ !!z[0], !!z[1] ]; else if (x || y) clamp[+!x] = !!z;
+      return brush;
+    };
+    brush.extent = function(z) {
+      var x0, x1, y0, y1, t;
+      if (!arguments.length) {
+        z = extentDomain || extent;
+        if (x) {
+          x0 = z[0][0], x1 = z[1][0];
+          if (!extentDomain) {
+            x0 = extent[0][0], x1 = extent[1][0];
+            if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);
+            if (x1 < x0) t = x0, x0 = x1, x1 = t;
+          }
+        }
+        if (y) {
+          y0 = z[0][1], y1 = z[1][1];
+          if (!extentDomain) {
+            y0 = extent[0][1], y1 = extent[1][1];
+            if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);
+            if (y1 < y0) t = y0, y0 = y1, y1 = t;
+          }
+        }
+        return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];
+      }
+      extentDomain = [ [ 0, 0 ], [ 0, 0 ] ];
+      if (x) {
+        x0 = z[0], x1 = z[1];
+        if (y) x0 = x0[0], x1 = x1[0];
+        extentDomain[0][0] = x0, extentDomain[1][0] = x1;
+        if (x.invert) x0 = x(x0), x1 = x(x1);
+        if (x1 < x0) t = x0, x0 = x1, x1 = t;
+        extent[0][0] = x0 | 0, extent[1][0] = x1 | 0;
+      }
+      if (y) {
+        y0 = z[0], y1 = z[1];
+        if (x) y0 = y0[1], y1 = y1[1];
+        extentDomain[0][1] = y0, extentDomain[1][1] = y1;
+        if (y.invert) y0 = y(y0), y1 = y(y1);
+        if (y1 < y0) t = y0, y0 = y1, y1 = t;
+        extent[0][1] = y0 | 0, extent[1][1] = y1 | 0;
+      }
+      return brush;
+    };
+    brush.clear = function() {
+      extentDomain = null;
+      extent[0][0] = extent[0][1] = extent[1][0] = extent[1][1] = 0;
+      return brush;
+    };
+    brush.empty = function() {
+      return x && extent[0][0] === extent[1][0] || y && extent[0][1] === extent[1][1];
+    };
+    return d3.rebind(brush, event, "on");
+  };
+  var d3_svg_brushCursor = {
+    n: "ns-resize",
+    e: "ew-resize",
+    s: "ns-resize",
+    w: "ew-resize",
+    nw: "nwse-resize",
+    ne: "nesw-resize",
+    se: "nwse-resize",
+    sw: "nesw-resize"
+  };
+  var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ];
+  d3.time = {};
+  var d3_time = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ];
+  function d3_time_utc() {
+    this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
+  }
+  d3_time_utc.prototype = {
+    getDate: function() {
+      return this._.getUTCDate();
+    },
+    getDay: function() {
+      return this._.getUTCDay();
+    },
+    getFullYear: function() {
+      return this._.getUTCFullYear();
+    },
+    getHours: function() {
+      return this._.getUTCHours();
+    },
+    getMilliseconds: function() {
+      return this._.getUTCMilliseconds();
+    },
+    getMinutes: function() {
+      return this._.getUTCMinutes();
+    },
+    getMonth: function() {
+      return this._.getUTCMonth();
+    },
+    getSeconds: function() {
+      return this._.getUTCSeconds();
+    },
+    getTime: function() {
+      return this._.getTime();
+    },
+    getTimezoneOffset: function() {
+      return 0;
+    },
+    valueOf: function() {
+      return this._.valueOf();
+    },
+    setDate: function() {
+      d3_time_prototype.setUTCDate.apply(this._, arguments);
+    },
+    setDay: function() {
+      d3_time_prototype.setUTCDay.apply(this._, arguments);
+    },
+    setFullYear: function() {
+      d3_time_prototype.setUTCFullYear.apply(this._, arguments);
+    },
+    setHours: function() {
+      d3_time_prototype.setUTCHours.apply(this._, arguments);
+    },
+    setMilliseconds: function() {
+      d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
+    },
+    setMinutes: function() {
+      d3_time_prototype.setUTCMinutes.apply(this._, arguments);
+    },
+    setMonth: function() {
+      d3_time_prototype.setUTCMonth.apply(this._, arguments);
+    },
+    setSeconds: function() {
+      d3_time_prototype.setUTCSeconds.apply(this._, arguments);
+    },
+    setTime: function() {
+      d3_time_prototype.setTime.apply(this._, arguments);
+    }
+  };
+  var d3_time_prototype = Date.prototype;
+  var d3_time_formatDateTime = "%a %b %e %X %Y", d3_time_formatDate = "%m/%d/%Y", d3_time_formatTime = "%H:%M:%S";
+  var d3_time_days = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], d3_time_dayAbbreviations = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], d3_time_months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], d3_time_monthAbbreviations = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ];
+  function d3_time_interval(local, step, number) {
+    function round(date) {
+      var d0 = local(date), d1 = offset(d0, 1);
+      return date - d0 < d1 - date ? d0 : d1;
+    }
+    function ceil(date) {
+      step(date = local(new d3_time(date - 1)), 1);
+      return date;
+    }
+    function offset(date, k) {
+      step(date = new d3_time(+date), k);
+      return date;
+    }
+    function range(t0, t1, dt) {
+      var time = ceil(t0), times = [];
+      if (dt > 1) {
+        while (time < t1) {
+          if (!(number(time) % dt)) times.push(new Date(+time));
+          step(time, 1);
+        }
+      } else {
+        while (time < t1) times.push(new Date(+time)), step(time, 1);
+      }
+      return times;
+    }
+    function range_utc(t0, t1, dt) {
+      try {
+        d3_time = d3_time_utc;
+        var utc = new d3_time_utc();
+        utc._ = t0;
+        return range(utc, t1, dt);
+      } finally {
+        d3_time = Date;
+      }
+    }
+    local.floor = local;
+    local.round = round;
+    local.ceil = ceil;
+    local.offset = offset;
+    local.range = range;
+    var utc = local.utc = d3_time_interval_utc(local);
+    utc.floor = utc;
+    utc.round = d3_time_interval_utc(round);
+    utc.ceil = d3_time_interval_utc(ceil);
+    utc.offset = d3_time_interval_utc(offset);
+    utc.range = range_utc;
+    return local;
+  }
+  function d3_time_interval_utc(method) {
+    return function(date, k) {
+      try {
+        d3_time = d3_time_utc;
+        var utc = new d3_time_utc();
+        utc._ = date;
+        return method(utc, k)._;
+      } finally {
+        d3_time = Date;
+      }
+    };
+  }
+  d3.time.year = d3_time_interval(function(date) {
+    date = d3.time.day(date);
+    date.setMonth(0, 1);
+    return date;
+  }, function(date, offset) {
+    date.setFullYear(date.getFullYear() + offset);
+  }, function(date) {
+    return date.getFullYear();
+  });
+  d3.time.years = d3.time.year.range;
+  d3.time.years.utc = d3.time.year.utc.range;
+  d3.time.day = d3_time_interval(function(date) {
+    var day = new d3_time(2e3, 0);
+    day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
+    return day;
+  }, function(date, offset) {
+    date.setDate(date.getDate() + offset);
+  }, function(date) {
+    return date.getDate() - 1;
+  });
+  d3.time.days = d3.time.day.range;
+  d3.time.days.utc = d3.time.day.utc.range;
+  d3.time.dayOfYear = function(date) {
+    var year = d3.time.year(date);
+    return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
+  };
+  d3_time_daySymbols.forEach(function(day, i) {
+    day = day.toLowerCase();
+    i = 7 - i;
+    var interval = d3.time[day] = d3_time_interval(function(date) {
+      (date = d3.time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
+      return date;
+    }, function(date, offset) {
+      date.setDate(date.getDate() + Math.floor(offset) * 7);
+    }, function(date) {
+      var day = d3.time.year(date).getDay();
+      return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
+    });
+    d3.time[day + "s"] = interval.range;
+    d3.time[day + "s"].utc = interval.utc.range;
+    d3.time[day + "OfYear"] = function(date) {
+      var day = d3.time.year(date).getDay();
+      return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7);
+    };
+  });
+  d3.time.week = d3.time.sunday;
+  d3.time.weeks = d3.time.sunday.range;
+  d3.time.weeks.utc = d3.time.sunday.utc.range;
+  d3.time.weekOfYear = d3.time.sundayOfYear;
+  d3.time.format = function(template) {
+    var n = template.length;
+    function format(date) {
+      var string = [], i = -1, j = 0, c, p, f;
+      while (++i < n) {
+        if (template.charCodeAt(i) === 37) {
+          string.push(template.substring(j, i));
+          if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);
+          if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p);
+          string.push(c);
+          j = i + 1;
+        }
+      }
+      string.push(template.substring(j, i));
+      return string.join("");
+    }
+    format.parse = function(string) {
+      var d = {
+        y: 1900,
+        m: 0,
+        d: 1,
+        H: 0,
+        M: 0,
+        S: 0,
+        L: 0
+      }, i = d3_time_parse(d, template, string, 0);
+      if (i != string.length) return null;
+      if ("p" in d) d.H = d.H % 12 + d.p * 12;
+      var date = new d3_time();
+      if ("j" in d) date.setFullYear(d.y, 0, d.j); else if ("w" in d && ("W" in d || "U" in d)) {
+        date.setFullYear(d.y, 0, 1);
+        date.setFullYear(d.y, 0, "W" in d ? (d.w + 6) % 7 + d.W * 7 - (date.getDay() + 5) % 7 : d.w + d.U * 7 - (date.getDay() + 6) % 7);
+      } else date.setFullYear(d.y, d.m, d.d);
+      date.setHours(d.H, d.M, d.S, d.L);
+      return date;
+    };
+    format.toString = function() {
+      return template;
+    };
+    return format;
+  };
+  function d3_time_parse(date, template, string, j) {
+    var c, p, i = 0, n = template.length, m = string.length;
+    while (i < n) {
+      if (j >= m) return -1;
+      c = template.charCodeAt(i++);
+      if (c === 37) {
+        p = d3_time_parsers[template.charAt(i++)];
+        if (!p || (j = p(date, string, j)) < 0) return -1;
+      } else if (c != string.charCodeAt(j++)) {
+        return -1;
+      }
+    }
+    return j;
+  }
+  function d3_time_formatRe(names) {
+    return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i");
+  }
+  function d3_time_formatLookup(names) {
+    var map = new d3_Map(), i = -1, n = names.length;
+    while (++i < n) map.set(names[i].toLowerCase(), i);
+    return map;
+  }
+  function d3_time_formatPad(value, fill, width) {
+    var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length;
+    return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
+  }
+  var d3_time_dayRe = d3_time_formatRe(d3_time_days), d3_time_dayLookup = d3_time_formatLookup(d3_time_days), d3_time_dayAbbrevRe = d3_time_formatRe(d3_time_dayAbbreviations), d3_time_dayAbbrevLookup = d3_time_formatLookup(d3_time_dayAbbreviations), d3_time_monthRe = d3_time_formatRe(d3_time_months), d3_time_monthLookup = d3_time_formatLookup(d3_time_months), d3_time_monthAbbrevRe = d3_time_formatRe(d3_time_monthAbbreviations), d3_time_monthAbbrevLookup = d3_time_formatLookup(d3_time_monthAbbreviations), d3_time_percentRe = /^%/;
+  var d3_time_formatPads = {
+    "-": "",
+    _: " ",
+    "0": "0"
+  };
+  var d3_time_formats = {
+    a: function(d) {
+      return d3_time_dayAbbreviations[d.getDay()];
+    },
+    A: function(d) {
+      return d3_time_days[d.getDay()];
+    },
+    b: function(d) {
+      return d3_time_monthAbbreviations[d.getMonth()];
+    },
+    B: function(d) {
+      return d3_time_months[d.getMonth()];
+    },
+    c: d3.time.format(d3_time_formatDateTime),
+    d: function(d, p) {
+      return d3_time_formatPad(d.getDate(), p, 2);
+    },
+    e: function(d, p) {
+      return d3_time_formatPad(d.getDate(), p, 2);
+    },
+    H: function(d, p) {
+      return d3_time_formatPad(d.getHours(), p, 2);
+    },
+    I: function(d, p) {
+      return d3_time_formatPad(d.getHours() % 12 || 12, p, 2);
+    },
+    j: function(d, p) {
+      return d3_time_formatPad(1 + d3.time.dayOfYear(d), p, 3);
+    },
+    L: function(d, p) {
+      return d3_time_formatPad(d.getMilliseconds(), p, 3);
+    },
+    m: function(d, p) {
+      return d3_time_formatPad(d.getMonth() + 1, p, 2);
+    },
+    M: function(d, p) {
+      return d3_time_formatPad(d.getMinutes(), p, 2);
+    },
+    p: function(d) {
+      return d.getHours() >= 12 ? "PM" : "AM";
+    },
+    S: function(d, p) {
+      return d3_time_formatPad(d.getSeconds(), p, 2);
+    },
+    U: function(d, p) {
+      return d3_time_formatPad(d3.time.sundayOfYear(d), p, 2);
+    },
+    w: function(d) {
+      return d.getDay();
+    },
+    W: function(d, p) {
+      return d3_time_formatPad(d3.time.mondayOfYear(d), p, 2);
+    },
+    x: d3.time.format(d3_time_formatDate),
+    X: d3.time.format(d3_time_formatTime),
+    y: function(d, p) {
+      return d3_time_formatPad(d.getFullYear() % 100, p, 2);
+    },
+    Y: function(d, p) {
+      return d3_time_formatPad(d.getFullYear() % 1e4, p, 4);
+    },
+    Z: d3_time_zone,
+    "%": function() {
+      return "%";
+    }
+  };
+  var d3_time_parsers = {
+    a: d3_time_parseWeekdayAbbrev,
+    A: d3_time_parseWeekday,
+    b: d3_time_parseMonthAbbrev,
+    B: d3_time_parseMonth,
+    c: d3_time_parseLocaleFull,
+    d: d3_time_parseDay,
+    e: d3_time_parseDay,
+    H: d3_time_parseHour24,
+    I: d3_time_parseHour24,
+    j: d3_time_parseDayOfYear,
+    L: d3_time_parseMilliseconds,
+    m: d3_time_parseMonthNumber,
+    M: d3_time_parseMinutes,
+    p: d3_time_parseAmPm,
+    S: d3_time_parseSeconds,
+    U: d3_time_parseWeekNumberSunday,
+    w: d3_time_parseWeekdayNumber,
+    W: d3_time_parseWeekNumberMonday,
+    x: d3_time_parseLocaleDate,
+    X: d3_time_parseLocaleTime,
+    y: d3_time_parseYear,
+    Y: d3_time_parseFullYear,
+    "%": d3_time_parseLiteralPercent
+  };
+  function d3_time_parseWeekdayAbbrev(date, string, i) {
+    d3_time_dayAbbrevRe.lastIndex = 0;
+    var n = d3_time_dayAbbrevRe.exec(string.substring(i));
+    return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+  }
+  function d3_time_parseWeekday(date, string, i) {
+    d3_time_dayRe.lastIndex = 0;
+    var n = d3_time_dayRe.exec(string.substring(i));
+    return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+  }
+  function d3_time_parseWeekdayNumber(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 1));
+    return n ? (date.w = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseWeekNumberSunday(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i));
+    return n ? (date.U = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseWeekNumberMonday(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i));
+    return n ? (date.W = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseMonthAbbrev(date, string, i) {
+    d3_time_monthAbbrevRe.lastIndex = 0;
+    var n = d3_time_monthAbbrevRe.exec(string.substring(i));
+    return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+  }
+  function d3_time_parseMonth(date, string, i) {
+    d3_time_monthRe.lastIndex = 0;
+    var n = d3_time_monthRe.exec(string.substring(i));
+    return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+  }
+  function d3_time_parseLocaleFull(date, string, i) {
+    return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
+  }
+  function d3_time_parseLocaleDate(date, string, i) {
+    return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
+  }
+  function d3_time_parseLocaleTime(date, string, i) {
+    return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
+  }
+  function d3_time_parseFullYear(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 4));
+    return n ? (date.y = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseYear(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+    return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1;
+  }
+  function d3_time_expandYear(d) {
+    return d + (d > 68 ? 1900 : 2e3);
+  }
+  function d3_time_parseMonthNumber(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+    return n ? (date.m = n[0] - 1, i + n[0].length) : -1;
+  }
+  function d3_time_parseDay(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+    return n ? (date.d = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseDayOfYear(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 3));
+    return n ? (date.j = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseHour24(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+    return n ? (date.H = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseMinutes(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+    return n ? (date.M = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseSeconds(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+    return n ? (date.S = +n[0], i + n[0].length) : -1;
+  }
+  function d3_time_parseMilliseconds(date, string, i) {
+    d3_time_numberRe.lastIndex = 0;
+    var n = d3_time_numberRe.exec(string.substring(i, i + 3));
+    return n ? (date.L = +n[0], i + n[0].length) : -1;
+  }
+  var d3_time_numberRe = /^\s*\d+/;
+  function d3_time_parseAmPm(date, string, i) {
+    var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase());
+    return n == null ? -1 : (date.p = n, i);
+  }
+  var d3_time_amPmLookup = d3.map({
+    am: 0,
+    pm: 1
+  });
+  function d3_time_zone(d) {
+    var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = ~~(Math.abs(z) / 60), zm = Math.abs(z) % 60;
+    return zs + d3_time_formatPad(zh, "0", 2) + d3_time_formatPad(zm, "0", 2);
+  }
+  function d3_time_parseLiteralPercent(date, string, i) {
+    d3_time_percentRe.lastIndex = 0;
+    var n = d3_time_percentRe.exec(string.substring(i, i + 1));
+    return n ? i + n[0].length : -1;
+  }
+  d3.time.format.utc = function(template) {
+    var local = d3.time.format(template);
+    function format(date) {
+      try {
+        d3_time = d3_time_utc;
+        var utc = new d3_time();
+        utc._ = date;
+        return local(utc);
+      } finally {
+        d3_time = Date;
+      }
+    }
+    format.parse = function(string) {
+      try {
+        d3_time = d3_time_utc;
+        var date = local.parse(string);
+        return date && date._;
+      } finally {
+        d3_time = Date;
+      }
+    };
+    format.toString = local.toString;
+    return format;
+  };
+  var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");
+  d3.time.format.iso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z") ? d3_time_formatIsoNative : d3_time_formatIso;
+  function d3_time_formatIsoNative(date) {
+    return date.toISOString();
+  }
+  d3_time_formatIsoNative.parse = function(string) {
+    var date = new Date(string);
+    return isNaN(date) ? null : date;
+  };
+  d3_time_formatIsoNative.toString = d3_time_formatIso.toString;
+  d3.time.second = d3_time_interval(function(date) {
+    return new d3_time(Math.floor(date / 1e3) * 1e3);
+  }, function(date, offset) {
+    date.setTime(date.getTime() + Math.floor(offset) * 1e3);
+  }, function(date) {
+    return date.getSeconds();
+  });
+  d3.time.seconds = d3.time.second.range;
+  d3.time.seconds.utc = d3.time.second.utc.range;
+  d3.time.minute = d3_time_interval(function(date) {
+    return new d3_time(Math.floor(date / 6e4) * 6e4);
+  }, function(date, offset) {
+    date.setTime(date.getTime() + Math.floor(offset) * 6e4);
+  }, function(date) {
+    return date.getMinutes();
+  });
+  d3.time.minutes = d3.time.minute.range;
+  d3.time.minutes.utc = d3.time.minute.utc.range;
+  d3.time.hour = d3_time_interval(function(date) {
+    var timezone = date.getTimezoneOffset() / 60;
+    return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);
+  }, function(date, offset) {
+    date.setTime(date.getTime() + Math.floor(offset) * 36e5);
+  }, function(date) {
+    return date.getHours();
+  });
+  d3.time.hours = d3.time.hour.range;
+  d3.time.hours.utc = d3.time.hour.utc.range;
+  d3.time.month = d3_time_interval(function(date) {
+    date = d3.time.day(date);
+    date.setDate(1);
+    return date;
+  }, function(date, offset) {
+    date.setMonth(date.getMonth() + offset);
+  }, function(date) {
+    return date.getMonth();
+  });
+  d3.time.months = d3.time.month.range;
+  d3.time.months.utc = d3.time.month.utc.range;
+  function d3_time_scale(linear, methods, format) {
+    function scale(x) {
+      return linear(x);
+    }
+    scale.invert = function(x) {
+      return d3_time_scaleDate(linear.invert(x));
+    };
+    scale.domain = function(x) {
+      if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
+      linear.domain(x);
+      return scale;
+    };
+    scale.nice = function(m) {
+      return scale.domain(d3_scale_nice(scale.domain(), m));
+    };
+    scale.ticks = function(m, k) {
+      var extent = d3_scaleExtent(scale.domain());
+      if (typeof m !== "function") {
+        var span = extent[1] - extent[0], target = span / m, i = d3.bisect(d3_time_scaleSteps, target);
+        if (i == d3_time_scaleSteps.length) return methods.year(extent, m);
+        if (!i) return linear.ticks(m).map(d3_time_scaleDate);
+        if (target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target) --i;
+        m = methods[i];
+        k = m[1];
+        m = m[0].range;
+      }
+      return m(extent[0], new Date(+extent[1] + 1), k);
+    };
+    scale.tickFormat = function() {
+      return format;
+    };
+    scale.copy = function() {
+      return d3_time_scale(linear.copy(), methods, format);
+    };
+    return d3_scale_linearRebind(scale, linear);
+  }
+  function d3_time_scaleDate(t) {
+    return new Date(t);
+  }
+  function d3_time_scaleFormat(formats) {
+    return function(date) {
+      var i = formats.length - 1, f = formats[i];
+      while (!f[1](date)) f = formats[--i];
+      return f[0](date);
+    };
+  }
+  function d3_time_scaleSetYear(y) {
+    var d = new Date(y, 0, 1);
+    d.setFullYear(y);
+    return d;
+  }
+  function d3_time_scaleGetYear(d) {
+    var y = d.getFullYear(), d0 = d3_time_scaleSetYear(y), d1 = d3_time_scaleSetYear(y + 1);
+    return y + (d - d0) / (d1 - d0);
+  }
+  var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];
+  var d3_time_scaleLocalMethods = [ [ d3.time.second, 1 ], [ d3.time.second, 5 ], [ d3.time.second, 15 ], [ d3.time.second, 30 ], [ d3.time.minute, 1 ], [ d3.time.minute, 5 ], [ d3.time.minute, 15 ], [ d3.time.minute, 30 ], [ d3.time.hour, 1 ], [ d3.time.hour, 3 ], [ d3.time.hour, 6 ], [ d3.time.hour, 12 ], [ d3.time.day, 1 ], [ d3.time.day, 2 ], [ d3.time.week, 1 ], [ d3.time.month, 1 ], [ d3.time.month, 3 ], [ d3.time.year, 1 ] ];
+  var d3_time_scaleLocalFormats = [ [ d3.time.format("%Y"), d3_true ], [ d3.time.format("%B"), function(d) {
+    return d.getMonth();
+  } ], [ d3.time.format("%b %d"), function(d) {
+    return d.getDate() != 1;
+  } ], [ d3.time.format("%a %d"), function(d) {
+    return d.getDay() && d.getDate() != 1;
+  } ], [ d3.time.format("%I %p"), function(d) {
+    return d.getHours();
+  } ], [ d3.time.format("%I:%M"), function(d) {
+    return d.getMinutes();
+  } ], [ d3.time.format(":%S"), function(d) {
+    return d.getSeconds();
+  } ], [ d3.time.format(".%L"), function(d) {
+    return d.getMilliseconds();
+  } ] ];
+  var d3_time_scaleLinear = d3.scale.linear(), d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);
+  d3_time_scaleLocalMethods.year = function(extent, m) {
+    return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear);
+  };
+  d3.time.scale = function() {
+    return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
+  };
+  var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) {
+    return [ m[0].utc, m[1] ];
+  });
+  var d3_time_scaleUTCFormats = [ [ d3.time.format.utc("%Y"), d3_true ], [ d3.time.format.utc("%B"), function(d) {
+    return d.getUTCMonth();
+  } ], [ d3.time.format.utc("%b %d"), function(d) {
+    return d.getUTCDate() != 1;
+  } ], [ d3.time.format.utc("%a %d"), function(d) {
+    return d.getUTCDay() && d.getUTCDate() != 1;
+  } ], [ d3.time.format.utc("%I %p"), function(d) {
+    return d.getUTCHours();
+  } ], [ d3.time.format.utc("%I:%M"), function(d) {
+    return d.getUTCMinutes();
+  } ], [ d3.time.format.utc(":%S"), function(d) {
+    return d.getUTCSeconds();
+  } ], [ d3.time.format.utc(".%L"), function(d) {
+    return d.getUTCMilliseconds();
+  } ] ];
+  var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);
+  function d3_time_scaleUTCSetYear(y) {
+    var d = new Date(Date.UTC(y, 0, 1));
+    d.setUTCFullYear(y);
+    return d;
+  }
+  function d3_time_scaleUTCGetYear(d) {
+    var y = d.getUTCFullYear(), d0 = d3_time_scaleUTCSetYear(y), d1 = d3_time_scaleUTCSetYear(y + 1);
+    return y + (d - d0) / (d1 - d0);
+  }
+  d3_time_scaleUTCMethods.year = function(extent, m) {
+    return d3_time_scaleLinear.domain(extent.map(d3_time_scaleUTCGetYear)).ticks(m).map(d3_time_scaleUTCSetYear);
+  };
+  d3.time.scale.utc = function() {
+    return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
+  };
+  d3.text = d3_xhrType(function(request) {
+    return request.responseText;
+  });
+  d3.json = function(url, callback) {
+    return d3_xhr(url, "application/json", d3_json, callback);
+  };
+  function d3_json(request) {
+    return JSON.parse(request.responseText);
+  }
+  d3.html = function(url, callback) {
+    return d3_xhr(url, "text/html", d3_html, callback);
+  };
+  function d3_html(request) {
+    var range = d3_document.createRange();
+    range.selectNode(d3_document.body);
+    return range.createContextualFragment(request.responseText);
+  }
+  d3.xml = d3_xhrType(function(request) {
+    return request.responseXML;
+  });
+  return d3;
+}();

+ 9789 - 0
hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/jquery.js

@@ -0,0 +1,9789 @@
+/*!
+ * jQuery JavaScript Library v1.10.2
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03T13:48Z
+ */
+(function( window, undefined ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//"use strict";
+var
+	// The deferred used on DOM ready
+	readyList,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// Support: IE<10
+	// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
+	core_strundefined = typeof undefined,
+
+	// Use the correct document accordingly with window argument (sandbox)
+	location = window.location,
+	document = window.document,
+	docElem = document.documentElement,
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// [[Class]] -> type pairs
+	class2type = {},
+
+	// List of deleted data cache ids, so we can reuse them
+	core_deletedIds = [],
+
+	core_version = "1.10.2",
+
+	// Save a reference to some core methods
+	core_concat = core_deletedIds.concat,
+	core_push = core_deletedIds.push,
+	core_slice = core_deletedIds.slice,
+	core_indexOf = core_deletedIds.indexOf,
+	core_toString = class2type.toString,
+	core_hasOwn = class2type.hasOwnProperty,
+	core_trim = core_version.trim,
+
+	// Define a local copy of jQuery
+	jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Used for matching numbers
+	core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+	// Used for splitting on whitespace
+	core_rnotwhite = /\S+/g,
+
+	// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+	// A simple way to check for HTML strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	// Strict HTML recognition (#11290: must start with <)
+	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
+
+	// Matches dashed string for camelizing
+	rmsPrefix = /^-ms-/,
+	rdashAlpha = /-([\da-z])/gi,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	},
+
+	// The ready event handler
+	completed = function( event ) {
+
+		// readyState === "complete" is good enough for us to call the dom ready in oldIE
+		if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+			detach();
+			jQuery.ready();
+		}
+	},
+	// Clean-up method for dom ready events
+	detach = function() {
+		if ( document.addEventListener ) {
+			document.removeEventListener( "DOMContentLoaded", completed, false );
+			window.removeEventListener( "load", completed, false );
+
+		} else {
+			document.detachEvent( "onreadystatechange", completed );
+			window.detachEvent( "onload", completed );
+		}
+	};
+
+jQuery.fn = jQuery.prototype = {
+	// The current version of jQuery being used
+	jquery: core_version,
+
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem;
+
+		// HANDLE: $(""), $(null), $(undefined), $(false)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = rquickExpr.exec( selector );
+			}
+
+			// Match html or make sure no context is specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+
+					// scripts is true for back-compat
+					jQuery.merge( this, jQuery.parseHTML(
+						match[1],
+						context && context.nodeType ? context.ownerDocument || context : document,
+						true
+					) );
+
+					// HANDLE: $(html, props)
+					if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+						for ( match in context ) {
+							// Properties of context are called as methods if possible
+							if ( jQuery.isFunction( this[ match ] ) ) {
+								this[ match ]( context[ match ] );
+
+							// ...and otherwise set as attributes
+							} else {
+								this.attr( match, context[ match ] );
+							}
+						}
+					}
+
+					return this;
+
+				// HANDLE: $(#id)
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(DOMElement)
+		} else if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	toArray: function() {
+		return core_slice.call( this );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems ) {
+
+		// Build a new jQuery matched element set
+		var ret = jQuery.merge( this.constructor(), elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+		ret.context = this.context;
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Add the callback
+		jQuery.ready.promise().done( fn );
+
+		return this;
+	},
+
+	slice: function() {
+		return this.pushStack( core_slice.apply( this, arguments ) );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	eq: function( i ) {
+		var len = this.length,
+			j = +i + ( i < 0 ? len : 0 );
+		return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: core_push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var src, copyIsArray, copy, name, options, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+	noConflict: function( deep ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+
+		// Abort if there are pending holds or we're already ready
+		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+			return;
+		}
+
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( !document.body ) {
+			return setTimeout( jQuery.ready );
+		}
+
+		// Remember that the DOM is ready
+		jQuery.isReady = true;
+
+		// If a normal DOM Ready event fired, decrement, and wait if need be
+		if ( wait !== true && --jQuery.readyWait > 0 ) {
+			return;
+		}
+
+		// If there are functions bound, to execute
+		readyList.resolveWith( document, [ jQuery ] );
+
+		// Trigger any bound ready events
+		if ( jQuery.fn.trigger ) {
+			jQuery( document ).trigger("ready").off("ready");
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	isWindow: function( obj ) {
+		/* jshint eqeqeq: false */
+		return obj != null && obj == obj.window;
+	},
+
+	isNumeric: function( obj ) {
+		return !isNaN( parseFloat(obj) ) && isFinite( obj );
+	},
+
+	type: function( obj ) {
+		if ( obj == null ) {
+			return String( obj );
+		}
+		return typeof obj === "object" || typeof obj === "function" ?
+			class2type[ core_toString.call(obj) ] || "object" :
+			typeof obj;
+	},
+
+	isPlainObject: function( obj ) {
+		var key;
+
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!core_hasOwn.call(obj, "constructor") &&
+				!core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Support: IE<9
+		// Handle iteration over inherited properties before own properties.
+		if ( jQuery.support.ownLast ) {
+			for ( key in obj ) {
+				return core_hasOwn.call( obj, key );
+			}
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+		for ( key in obj ) {}
+
+		return key === undefined || core_hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		var name;
+		for ( name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	// data: string of html
+	// context (optional): If specified, the fragment will be created in this context, defaults to document
+	// keepScripts (optional): If true, will include scripts passed in the html string
+	parseHTML: function( data, context, keepScripts ) {
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		if ( typeof context === "boolean" ) {
+			keepScripts = context;
+			context = false;
+		}
+		context = context || document;
+
+		var parsed = rsingleTag.exec( data ),
+			scripts = !keepScripts && [];
+
+		// Single tag
+		if ( parsed ) {
+			return [ context.createElement( parsed[1] ) ];
+		}
+
+		parsed = jQuery.buildFragment( [ data ], context, scripts );
+		if ( scripts ) {
+			jQuery( scripts ).remove();
+		}
+		return jQuery.merge( [], parsed.childNodes );
+	},
+
+	parseJSON: function( data ) {
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		if ( data === null ) {
+			return data;
+		}
+
+		if ( typeof data === "string" ) {
+
+			// Make sure leading/trailing whitespace is removed (IE can't handle it)
+			data = jQuery.trim( data );
+
+			if ( data ) {
+				// Make sure the incoming data is actual JSON
+				// Logic borrowed from http://json.org/json2.js
+				if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+					.replace( rvalidtokens, "]" )
+					.replace( rvalidbraces, "")) ) {
+
+					return ( new Function( "return " + data ) )();
+				}
+			}
+		}
+
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		var xml, tmp;
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && jQuery.trim( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+	},
+
+	// args is for internal usage only
+	each: function( obj, callback, args ) {
+		var value,
+			i = 0,
+			length = obj.length,
+			isArray = isArraylike( obj );
+
+		if ( args ) {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return obj;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+		function( text ) {
+			return text == null ?
+				"" :
+				core_trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				( text + "" ).replace( rtrim, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( arr, results ) {
+		var ret = results || [];
+
+		if ( arr != null ) {
+			if ( isArraylike( Object(arr) ) ) {
+				jQuery.merge( ret,
+					typeof arr === "string" ?
+					[ arr ] : arr
+				);
+			} else {
+				core_push.call( ret, arr );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, arr, i ) {
+		var len;
+
+		if ( arr ) {
+			if ( core_indexOf ) {
+				return core_indexOf.call( arr, elem, i );
+			}
+
+			len = arr.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in arr && arr[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var l = second.length,
+			i = first.length,
+			j = 0;
+
+		if ( typeof l === "number" ) {
+			for ( ; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var retVal,
+			ret = [],
+			i = 0,
+			length = elems.length;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( ; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value,
+			i = 0,
+			length = elems.length,
+			isArray = isArraylike( elems ),
+			ret = [];
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( i in elems ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return core_concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		var args, proxy, tmp;
+
+		if ( typeof context === "string" ) {
+			tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		args = core_slice.call( arguments, 2 );
+		proxy = function() {
+			return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+		};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Multifunctional method to get and set values of a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+		var i = 0,
+			length = elems.length,
+			bulk = key == null;
+
+		// Sets many values
+		if ( jQuery.type( key ) === "object" ) {
+			chainable = true;
+			for ( i in key ) {
+				jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+			}
+
+		// Sets one value
+		} else if ( value !== undefined ) {
+			chainable = true;
+
+			if ( !jQuery.isFunction( value ) ) {
+				raw = true;
+			}
+
+			if ( bulk ) {
+				// Bulk operations run against the entire set
+				if ( raw ) {
+					fn.call( elems, value );
+					fn = null;
+
+				// ...except when executing function values
+				} else {
+					bulk = fn;
+					fn = function( elem, key, value ) {
+						return bulk.call( jQuery( elem ), value );
+					};
+				}
+			}
+
+			if ( fn ) {
+				for ( ; i < length; i++ ) {
+					fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+				}
+			}
+		}
+
+		return chainable ?
+			elems :
+
+			// Gets
+			bulk ?
+				fn.call( elems ) :
+				length ? fn( elems[0], key ) : emptyGet;
+	},
+
+	now: function() {
+		return ( new Date() ).getTime();
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations.
+	// Note: this method belongs to the css module but it's needed here for the support module.
+	// If support gets modularized, this method should be moved back to the css module.
+	swap: function( elem, options, callback, args ) {
+		var ret, name,
+			old = {};
+
+		// Remember the old values, and insert the new ones
+		for ( name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		ret = callback.apply( elem, args || [] );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+
+		return ret;
+	}
+});
+
+jQuery.ready.promise = function( obj ) {
+	if ( !readyList ) {
+
+		readyList = jQuery.Deferred();
+
+		// Catch cases where $(document).ready() is called after the browser event has already occurred.
+		// we once tried to use readyState "interactive" here, but it caused issues like the one
+		// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			setTimeout( jQuery.ready );
+
+		// Standards-based browsers support DOMContentLoaded
+		} else if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", completed, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", completed, false );
+
+		// If IE event model is used
+		} else {
+			// Ensure firing before onload, maybe late but safe also for iframes
+			document.attachEvent( "onreadystatechange", completed );
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", completed );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var top = false;
+
+			try {
+				top = window.frameElement == null && document.documentElement;
+			} catch(e) {}
+
+			if ( top && top.doScroll ) {
+				(function doScrollCheck() {
+					if ( !jQuery.isReady ) {
+
+						try {
+							// Use the trick by Diego Perini
+							// http://javascript.nwbox.com/IEContentLoaded/
+							top.doScroll("left");
+						} catch(e) {
+							return setTimeout( doScrollCheck, 50 );
+						}
+
+						// detach all dom ready events
+						detach();
+
+						// and execute any waiting functions
+						jQuery.ready();
+					}
+				})();
+			}
+		}
+	}
+	return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+	var length = obj.length,
+		type = jQuery.type( obj );
+
+	if ( jQuery.isWindow( obj ) ) {
+		return false;
+	}
+
+	if ( obj.nodeType === 1 && length ) {
+		return true;
+	}
+
+	return type === "array" || type !== "function" &&
+		( length === 0 ||
+		typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+/*!
+ * Sizzle CSS Selector Engine v1.10.2
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03
+ */
+(function( window, undefined ) {
+
+var i,
+	support,
+	cachedruns,
+	Expr,
+	getText,
+	isXML,
+	compile,
+	outermostContext,
+	sortInput,
+
+	// Local document vars
+	setDocument,
+	document,
+	docElem,
+	documentIsHTML,
+	rbuggyQSA,
+	rbuggyMatches,
+	matches,
+	contains,
+
+	// Instance-specific data
+	expando = "sizzle" + -(new Date()),
+	preferredDoc = window.document,
+	dirruns = 0,
+	done = 0,
+	classCache = createCache(),
+	tokenCache = createCache(),
+	compilerCache = createCache(),
+	hasDuplicate = false,
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+		return 0;
+	},
+
+	// General-purpose constants
+	strundefined = typeof undefined,
+	MAX_NEGATIVE = 1 << 31,
+
+	// Instance methods
+	hasOwn = ({}).hasOwnProperty,
+	arr = [],
+	pop = arr.pop,
+	push_native = arr.push,
+	push = arr.push,
+	slice = arr.slice,
+	// Use a stripped-down indexOf if we can't use a native one
+	indexOf = arr.indexOf || function( elem ) {
+		var i = 0,
+			len = this.length;
+		for ( ; i < len; i++ ) {
+			if ( this[i] === elem ) {
+				return i;
+			}
+		}
+		return -1;
+	},
+
+	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+	// Regular expressions
+
+	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+	whitespace = "[\\x20\\t\\r\\n\\f]",
+	// http://www.w3.org/TR/css3-syntax/#characters
+	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+	// Loosely modeled on CSS identifier characters
+	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+	identifier = characterEncoding.replace( "w", "w#" ),
+
+	// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+		"*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+	// Prefer arguments quoted,
+	//   then not containing pseudos/brackets,
+	//   then attribute selectors/non-parenthetical expressions,
+	//   then anything else
+	// These preferences are here to reduce the number of selectors
+	//   needing tokenize in the PSEUDO preFilter
+	pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+	rsibling = new RegExp( whitespace + "*[+~]" ),
+	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
+
+	rpseudo = new RegExp( pseudos ),
+	ridentifier = new RegExp( "^" + identifier + "$" ),
+
+	matchExpr = {
+		"ID": new RegExp( "^#(" + characterEncoding + ")" ),
+		"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+		"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+		"ATTR": new RegExp( "^" + attributes ),
+		"PSEUDO": new RegExp( "^" + pseudos ),
+		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+		// For use in libraries implementing .is()
+		// We use this for POS matching in `select`
+		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+	},
+
+	rnative = /^[^{]+\{\s*\[native \w/,
+
+	// Easily-parseable/retrievable ID or TAG or CLASS selectors
+	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+	rinputs = /^(?:input|select|textarea|button)$/i,
+	rheader = /^h\d$/i,
+
+	rescape = /'|\\/g,
+
+	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+	funescape = function( _, escaped, escapedWhitespace ) {
+		var high = "0x" + escaped - 0x10000;
+		// NaN means non-codepoint
+		// Support: Firefox
+		// Workaround erroneous numeric interpretation of +"0x"
+		return high !== high || escapedWhitespace ?
+			escaped :
+			// BMP codepoint
+			high < 0 ?
+				String.fromCharCode( high + 0x10000 ) :
+				// Supplemental Plane codepoint (surrogate pair)
+				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+	};
+
+// Optimize for push.apply( _, NodeList )
+try {
+	push.apply(
+		(arr = slice.call( preferredDoc.childNodes )),
+		preferredDoc.childNodes
+	);
+	// Support: Android<4.0
+	// Detect silently failing push.apply
+	arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+	push = { apply: arr.length ?
+
+		// Leverage slice if possible
+		function( target, els ) {
+			push_native.apply( target, slice.call(els) );
+		} :
+
+		// Support: IE<9
+		// Otherwise append directly
+		function( target, els ) {
+			var j = target.length,
+				i = 0;
+			// Can't trust NodeList.length
+			while ( (target[j++] = els[i++]) ) {}
+			target.length = j - 1;
+		}
+	};
+}
+
+function Sizzle( selector, context, results, seed ) {
+	var match, elem, m, nodeType,
+		// QSA vars
+		i, groups, old, nid, newContext, newSelector;
+
+	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+		setDocument( context );
+	}
+
+	context = context || document;
+	results = results || [];
+
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+		return [];
+	}
+
+	if ( documentIsHTML && !seed ) {
+
+		// Shortcuts
+		if ( (match = rquickExpr.exec( selector )) ) {
+			// Speed-up: Sizzle("#ID")
+			if ( (m = match[1]) ) {
+				if ( nodeType === 9 ) {
+					elem = context.getElementById( m );
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE, Opera, and Webkit return items
+						// by name instead of ID
+						if ( elem.id === m ) {
+							results.push( elem );
+							return results;
+						}
+					} else {
+						return results;
+					}
+				} else {
+					// Context is not a document
+					if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+						contains( context, elem ) && elem.id === m ) {
+						results.push( elem );
+						return results;
+					}
+				}
+
+			// Speed-up: Sizzle("TAG")
+			} else if ( match[2] ) {
+				push.apply( results, context.getElementsByTagName( selector ) );
+				return results;
+
+			// Speed-up: Sizzle(".CLASS")
+			} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+				push.apply( results, context.getElementsByClassName( m ) );
+				return results;
+			}
+		}
+
+		// QSA path
+		if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+			nid = old = expando;
+			newContext = context;
+			newSelector = nodeType === 9 && selector;
+
+			// qSA works strangely on Element-rooted queries
+			// We can work around this by specifying an extra ID on the root
+			// and working up from there (Thanks to Andrew Dupont for the technique)
+			// IE 8 doesn't work on object elements
+			if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+				groups = tokenize( selector );
+
+				if ( (old = context.getAttribute("id")) ) {
+					nid = old.replace( rescape, "\\$&" );
+				} else {
+					context.setAttribute( "id", nid );
+				}
+				nid = "[id='" + nid + "'] ";
+
+				i = groups.length;
+				while ( i-- ) {
+					groups[i] = nid + toSelector( groups[i] );
+				}
+				newContext = rsibling.test( selector ) && context.parentNode || context;
+				newSelector = groups.join(",");
+			}
+
+			if ( newSelector ) {
+				try {
+					push.apply( results,
+						newContext.querySelectorAll( newSelector )
+					);
+					return results;
+				} catch(qsaError) {
+				} finally {
+					if ( !old ) {
+						context.removeAttribute("id");
+					}
+				}
+			}
+		}
+	}
+
+	// All others
+	return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *	deleting the oldest entry
+ */
+function createCache() {
+	var keys = [];
+
+	function cache( key, value ) {
+		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+		if ( keys.push( key += " " ) > Expr.cacheLength ) {
+			// Only keep the most recent entries
+			delete cache[ keys.shift() ];
+		}
+		return (cache[ key ] = value);
+	}
+	return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+	fn[ expando ] = true;
+	return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+	var div = document.createElement("div");
+
+	try {
+		return !!fn( div );
+	} catch (e) {
+		return false;
+	} finally {
+		// Remove from its parent by default
+		if ( div.parentNode ) {
+			div.parentNode.removeChild( div );
+		}
+		// release memory in IE
+		div = null;
+	}
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+	var arr = attrs.split("|"),
+		i = attrs.length;
+
+	while ( i-- ) {
+		Expr.attrHandle[ arr[i] ] = handler;
+	}
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+	var cur = b && a,
+		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+			( ~b.sourceIndex || MAX_NEGATIVE ) -
+			( ~a.sourceIndex || MAX_NEGATIVE );
+
+	// Use IE sourceIndex if available on both nodes
+	if ( diff ) {
+		return diff;
+	}
+
+	// Check if b follows a
+	if ( cur ) {
+		while ( (cur = cur.nextSibling) ) {
+			if ( cur === b ) {
+				return -1;
+			}
+		}
+	}
+
+	return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return name === "input" && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return (name === "input" || name === "button") && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+	return markFunction(function( argument ) {
+		argument = +argument;
+		return markFunction(function( seed, matches ) {
+			var j,
+				matchIndexes = fn( [], seed.length, argument ),
+				i = matchIndexes.length;
+
+			// Match elements found at the specified indexes
+			while ( i-- ) {
+				if ( seed[ (j = matchIndexes[i]) ] ) {
+					seed[j] = !(matches[j] = seed[j]);
+				}
+			}
+		});
+	});
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833)
+	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+	var doc = node ? node.ownerDocument || node : preferredDoc,
+		parent = doc.defaultView;
+
+	// If no document and documentElement is available, return
+	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+		return document;
+	}
+
+	// Set our document
+	document = doc;
+	docElem = doc.documentElement;
+
+	// Support tests
+	documentIsHTML = !isXML( doc );
+
+	// Support: IE>8
+	// If iframe document is assigned to "document" variable and if iframe has been reloaded,
+	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+	// IE6-8 do not support the defaultView property so parent will be undefined
+	if ( parent && parent.attachEvent && parent !== parent.top ) {
+		parent.attachEvent( "onbeforeunload", function() {
+			setDocument();
+		});
+	}
+
+	/* Attributes
+	---------------------------------------------------------------------- */
+
+	// Support: IE<8
+	// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+	support.attributes = assert(function( div ) {
+		div.className = "i";
+		return !div.getAttribute("className");
+	});
+
+	/* getElement(s)By*
+	---------------------------------------------------------------------- */
+
+	// Check if getElementsByTagName("*") returns only elements
+	support.getElementsByTagName = assert(function( div ) {
+		div.appendChild( doc.createComment("") );
+		return !div.getElementsByTagName("*").length;
+	});
+
+	// Check if getElementsByClassName can be trusted
+	support.getElementsByClassName = assert(function( div ) {
+		div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+		// Support: Safari<4
+		// Catch class over-caching
+		div.firstChild.className = "i";
+		// Support: Opera<10
+		// Catch gEBCN failure to find non-leading classes
+		return div.getElementsByClassName("i").length === 2;
+	});
+
+	// Support: IE<10
+	// Check if getElementById returns elements by name
+	// The broken getElementById methods don't pick up programatically-set names,
+	// so use a roundabout getElementsByName test
+	support.getById = assert(function( div ) {
+		docElem.appendChild( div ).id = expando;
+		return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+	});
+
+	// ID find and filter
+	if ( support.getById ) {
+		Expr.find["ID"] = function( id, context ) {
+			if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+				var m = context.getElementById( id );
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		};
+		Expr.filter["ID"] = function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				return elem.getAttribute("id") === attrId;
+			};
+		};
+	} else {
+		// Support: IE6/7
+		// getElementById is not reliable as a find shortcut
+		delete Expr.find["ID"];
+
+		Expr.filter["ID"] =  function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+				return node && node.value === attrId;
+			};
+		};
+	}
+
+	// Tag
+	Expr.find["TAG"] = support.getElementsByTagName ?
+		function( tag, context ) {
+			if ( typeof context.getElementsByTagName !== strundefined ) {
+				return context.getElementsByTagName( tag );
+			}
+		} :
+		function( tag, context ) {
+			var elem,
+				tmp = [],
+				i = 0,
+				results = context.getElementsByTagName( tag );
+
+			// Filter out possible comments
+			if ( tag === "*" ) {
+				while ( (elem = results[i++]) ) {
+					if ( elem.nodeType === 1 ) {
+						tmp.push( elem );
+					}
+				}
+
+				return tmp;
+			}
+			return results;
+		};
+
+	// Class
+	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+		if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+			return context.getElementsByClassName( className );
+		}
+	};
+
+	/* QSA/matchesSelector
+	---------------------------------------------------------------------- */
+
+	// QSA and matchesSelector support
+
+	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+	rbuggyMatches = [];
+
+	// qSa(:focus) reports false when true (Chrome 21)
+	// We allow this because of a bug in IE8/9 that throws an error
+	// whenever `document.activeElement` is accessed on an iframe
+	// So, we allow :focus to pass through QSA all the time to avoid the IE error
+	// See http://bugs.jquery.com/ticket/13378
+	rbuggyQSA = [];
+
+	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+		// Build QSA regex
+		// Regex strategy adopted from Diego Perini
+		assert(function( div ) {
+			// Select is set to empty string on purpose
+			// This is to test IE's treatment of not explicitly
+			// setting a boolean content attribute,
+			// since its presence should be enough
+			// http://bugs.jquery.com/ticket/12359
+			div.innerHTML = "<select><option selected=''></option></select>";
+
+			// Support: IE8
+			// Boolean attributes and "value" are not treated correctly
+			if ( !div.querySelectorAll("[selected]").length ) {
+				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+			}
+
+			// Webkit/Opera - :checked should return selected option elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":checked").length ) {
+				rbuggyQSA.push(":checked");
+			}
+		});
+
+		assert(function( div ) {
+
+			// Support: Opera 10-12/IE8
+			// ^= $= *= and empty values
+			// Should not select anything
+			// Support: Windows 8 Native Apps
+			// The type attribute is restricted during .innerHTML assignment
+			var input = doc.createElement("input");
+			input.setAttribute( "type", "hidden" );
+			div.appendChild( input ).setAttribute( "t", "" );
+
+			if ( div.querySelectorAll("[t^='']").length ) {
+				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+			}
+
+			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":enabled").length ) {
+				rbuggyQSA.push( ":enabled", ":disabled" );
+			}
+
+			// Opera 10-11 does not throw on post-comma invalid pseudos
+			div.querySelectorAll("*,:x");
+			rbuggyQSA.push(",.*:");
+		});
+	}
+
+	if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
+		docElem.mozMatchesSelector ||
+		docElem.oMatchesSelector ||
+		docElem.msMatchesSelector) )) ) {
+
+		assert(function( div ) {
+			// Check to see if it's possible to do matchesSelector
+			// on a disconnected node (IE 9)
+			support.disconnectedMatch = matches.call( div, "div" );
+
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( div, "[s!='']:x" );
+			rbuggyMatches.push( "!=", pseudos );
+		});
+	}
+
+	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+	/* Contains
+	---------------------------------------------------------------------- */
+
+	// Element contains another
+	// Purposefully does not implement inclusive descendent
+	// As in, an element does not contain itself
+	contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
+		function( a, b ) {
+			var adown = a.nodeType === 9 ? a.documentElement : a,
+				bup = b && b.parentNode;
+			return a === bup || !!( bup && bup.nodeType === 1 && (
+				adown.contains ?
+					adown.contains( bup ) :
+					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+			));
+		} :
+		function( a, b ) {
+			if ( b ) {
+				while ( (b = b.parentNode) ) {
+					if ( b === a ) {
+						return true;
+					}
+				}
+			}
+			return false;
+		};
+
+	/* Sorting
+	---------------------------------------------------------------------- */
+
+	// Document order sorting
+	sortOrder = docElem.compareDocumentPosition ?
+	function( a, b ) {
+
+		// Flag for duplicate removal
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+		if ( compare ) {
+			// Disconnected nodes
+			if ( compare & 1 ||
+				(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+				// Choose the first element that is related to our preferred document
+				if ( a === doc || contains(preferredDoc, a) ) {
+					return -1;
+				}
+				if ( b === doc || contains(preferredDoc, b) ) {
+					return 1;
+				}
+
+				// Maintain original order
+				return sortInput ?
+					( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+					0;
+			}
+
+			return compare & 4 ? -1 : 1;
+		}
+
+		// Not directly comparable, sort on existence of method
+		return a.compareDocumentPosition ? -1 : 1;
+	} :
+	function( a, b ) {
+		var cur,
+			i = 0,
+			aup = a.parentNode,
+			bup = b.parentNode,
+			ap = [ a ],
+			bp = [ b ];
+
+		// Exit early if the nodes are identical
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// Parentless nodes are either documents or disconnected
+		} else if ( !aup || !bup ) {
+			return a === doc ? -1 :
+				b === doc ? 1 :
+				aup ? -1 :
+				bup ? 1 :
+				sortInput ?
+				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+				0;
+
+		// If the nodes are siblings, we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+		}
+
+		// Otherwise we need full lists of their ancestors for comparison
+		cur = a;
+		while ( (cur = cur.parentNode) ) {
+			ap.unshift( cur );
+		}
+		cur = b;
+		while ( (cur = cur.parentNode) ) {
+			bp.unshift( cur );
+		}
+
+		// Walk down the tree looking for a discrepancy
+		while ( ap[i] === bp[i] ) {
+			i++;
+		}
+
+		return i ?
+			// Do a sibling check if the nodes have a common ancestor
+			siblingCheck( ap[i], bp[i] ) :
+
+			// Otherwise nodes in our document sort first
+			ap[i] === preferredDoc ? -1 :
+			bp[i] === preferredDoc ? 1 :
+			0;
+	};
+
+	return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+	return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	// Make sure that attribute selectors are quoted
+	expr = expr.replace( rattributeQuotes, "='$1']" );
+
+	if ( support.matchesSelector && documentIsHTML &&
+		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+		try {
+			var ret = matches.call( elem, expr );
+
+			// IE 9's matchesSelector returns false on disconnected nodes
+			if ( ret || support.disconnectedMatch ||
+					// As well, disconnected nodes are said to be in a document
+					// fragment in IE 9
+					elem.document && elem.document.nodeType !== 11 ) {
+				return ret;
+			}
+		} catch(e) {}
+	}
+
+	return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+	// Set document vars if needed
+	if ( ( context.ownerDocument || context ) !== document ) {
+		setDocument( context );
+	}
+	return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	var fn = Expr.attrHandle[ name.toLowerCase() ],
+		// Don't get fooled by Object.prototype properties (jQuery #13807)
+		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+			fn( elem, name, !documentIsHTML ) :
+			undefined;
+
+	return val === undefined ?
+		support.attributes || !documentIsHTML ?
+			elem.getAttribute( name ) :
+			(val = elem.getAttributeNode(name)) && val.specified ?
+				val.value :
+				null :
+		val;
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+	var elem,
+		duplicates = [],
+		j = 0,
+		i = 0;
+
+	// Unless we *know* we can detect duplicates, assume their presence
+	hasDuplicate = !support.detectDuplicates;
+	sortInput = !support.sortStable && results.slice( 0 );
+	results.sort( sortOrder );
+
+	if ( hasDuplicate ) {
+		while ( (elem = results[i++]) ) {
+			if ( elem === results[ i ] ) {
+				j = duplicates.push( i );
+			}
+		}
+		while ( j-- ) {
+			results.splice( duplicates[ j ], 1 );
+		}
+	}
+
+	return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+	var node,
+		ret = "",
+		i = 0,
+		nodeType = elem.nodeType;
+
+	if ( !nodeType ) {
+		// If no nodeType, this is expected to be an array
+		for ( ; (node = elem[i]); i++ ) {
+			// Do not traverse comment nodes
+			ret += getText( node );
+		}
+	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+		// Use textContent for elements
+		// innerText usage removed for consistency of new lines (see #11153)
+		if ( typeof elem.textContent === "string" ) {
+			return elem.textContent;
+		} else {
+			// Traverse its children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				ret += getText( elem );
+			}
+		}
+	} else if ( nodeType === 3 || nodeType === 4 ) {
+		return elem.nodeValue;
+	}
+	// Do not include comment or processing instruction nodes
+
+	return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+	// Can be adjusted by the user
+	cacheLength: 50,
+
+	createPseudo: markFunction,
+
+	match: matchExpr,
+
+	attrHandle: {},
+
+	find: {},
+
+	relative: {
+		">": { dir: "parentNode", first: true },
+		" ": { dir: "parentNode" },
+		"+": { dir: "previousSibling", first: true },
+		"~": { dir: "previousSibling" }
+	},
+
+	preFilter: {
+		"ATTR": function( match ) {
+			match[1] = match[1].replace( runescape, funescape );
+
+			// Move the given value to match[3] whether quoted or unquoted
+			match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+			if ( match[2] === "~=" ) {
+				match[3] = " " + match[3] + " ";
+			}
+
+			return match.slice( 0, 4 );
+		},
+
+		"CHILD": function( match ) {
+			/* matches from matchExpr["CHILD"]
+				1 type (only|nth|...)
+				2 what (child|of-type)
+				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+				4 xn-component of xn+y argument ([+-]?\d*n|)
+				5 sign of xn-component
+				6 x of xn-component
+				7 sign of y-component
+				8 y of y-component
+			*/
+			match[1] = match[1].toLowerCase();
+
+			if ( match[1].slice( 0, 3 ) === "nth" ) {
+				// nth-* requires argument
+				if ( !match[3] ) {
+					Sizzle.error( match[0] );
+				}
+
+				// numeric x and y parameters for Expr.filter.CHILD
+				// remember that false/true cast respectively to 0/1
+				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+			// other types prohibit arguments
+			} else if ( match[3] ) {
+				Sizzle.error( match[0] );
+			}
+
+			return match;
+		},
+
+		"PSEUDO": function( match ) {
+			var excess,
+				unquoted = !match[5] && match[2];
+
+			if ( matchExpr["CHILD"].test( match[0] ) ) {
+				return null;
+			}
+
+			// Accept quoted arguments as-is
+			if ( match[3] && match[4] !== undefined ) {
+				match[2] = match[4];
+
+			// Strip excess characters from unquoted arguments
+			} else if ( unquoted && rpseudo.test( unquoted ) &&
+				// Get excess from tokenize (recursively)
+				(excess = tokenize( unquoted, true )) &&
+				// advance to the next closing parenthesis
+				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+				// excess is a negative index
+				match[0] = match[0].slice( 0, excess );
+				match[2] = unquoted.slice( 0, excess );
+			}
+
+			// Return only captures needed by the pseudo filter method (type and argument)
+			return match.slice( 0, 3 );
+		}
+	},
+
+	filter: {
+
+		"TAG": function( nodeNameSelector ) {
+			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+			return nodeNameSelector === "*" ?
+				function() { return true; } :
+				function( elem ) {
+					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+				};
+		},
+
+		"CLASS": function( className ) {
+			var pattern = classCache[ className + " " ];
+
+			return pattern ||
+				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+				classCache( className, function( elem ) {
+					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+				});
+		},
+
+		"ATTR": function( name, operator, check ) {
+			return function( elem ) {
+				var result = Sizzle.attr( elem, name );
+
+				if ( result == null ) {
+					return operator === "!=";
+				}
+				if ( !operator ) {
+					return true;
+				}
+
+				result += "";
+
+				return operator === "=" ? result === check :
+					operator === "!=" ? result !== check :
+					operator === "^=" ? check && result.indexOf( check ) === 0 :
+					operator === "*=" ? check && result.indexOf( check ) > -1 :
+					operator === "$=" ? check && result.slice( -check.length ) === check :
+					operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+					false;
+			};
+		},
+
+		"CHILD": function( type, what, argument, first, last ) {
+			var simple = type.slice( 0, 3 ) !== "nth",
+				forward = type.slice( -4 ) !== "last",
+				ofType = what === "of-type";
+
+			return first === 1 && last === 0 ?
+
+				// Shortcut for :nth-*(n)
+				function( elem ) {
+					return !!elem.parentNode;
+				} :
+
+				function( elem, context, xml ) {
+					var cache, outerCache, node, diff, nodeIndex, start,
+						dir = simple !== forward ? "nextSibling" : "previousSibling",
+						parent = elem.parentNode,
+						name = ofType && elem.nodeName.toLowerCase(),
+						useCache = !xml && !ofType;
+
+					if ( parent ) {
+
+						// :(first|last|only)-(child|of-type)
+						if ( simple ) {
+							while ( dir ) {
+								node = elem;
+								while ( (node = node[ dir ]) ) {
+									if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+										return false;
+									}
+								}
+								// Reverse direction for :only-* (if we haven't yet done so)
+								start = dir = type === "only" && !start && "nextSibling";
+							}
+							return true;
+						}
+
+						start = [ forward ? parent.firstChild : parent.lastChild ];
+
+						// non-xml :nth-child(...) stores cache data on `parent`
+						if ( forward && useCache ) {
+							// Seek `elem` from a previously-cached index
+							outerCache = parent[ expando ] || (parent[ expando ] = {});
+							cache = outerCache[ type ] || [];
+							nodeIndex = cache[0] === dirruns && cache[1];
+							diff = cache[0] === dirruns && cache[2];
+							node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+								// Fallback to seeking `elem` from the start
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								// When found, cache indexes on `parent` and break
+								if ( node.nodeType === 1 && ++diff && node === elem ) {
+									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+									break;
+								}
+							}
+
+						// Use previously-cached element index if available
+						} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+							diff = cache[1];
+
+						// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+						} else {
+							// Use the same loop as above to seek `elem` from the start
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+									// Cache the index of each encountered element
+									if ( useCache ) {
+										(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+									}
+
+									if ( node === elem ) {
+										break;
+									}
+								}
+							}
+						}
+
+						// Incorporate the offset, then check against cycle size
+						diff -= last;
+						return diff === first || ( diff % first === 0 && diff / first >= 0 );
+					}
+				};
+		},
+
+		"PSEUDO": function( pseudo, argument ) {
+			// pseudo-class names are case-insensitive
+			// http://www.w3.org/TR/selectors/#pseudo-classes
+			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+			// Remember that setFilters inherits from pseudos
+			var args,
+				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+					Sizzle.error( "unsupported pseudo: " + pseudo );
+
+			// The user may use createPseudo to indicate that
+			// arguments are needed to create the filter function
+			// just as Sizzle does
+			if ( fn[ expando ] ) {
+				return fn( argument );
+			}
+
+			// But maintain support for old signatures
+			if ( fn.length > 1 ) {
+				args = [ pseudo, pseudo, "", argument ];
+				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+					markFunction(function( seed, matches ) {
+						var idx,
+							matched = fn( seed, argument ),
+							i = matched.length;
+						while ( i-- ) {
+							idx = indexOf.call( seed, matched[i] );
+							seed[ idx ] = !( matches[ idx ] = matched[i] );
+						}
+					}) :
+					function( elem ) {
+						return fn( elem, 0, args );
+					};
+			}
+
+			return fn;
+		}
+	},
+
+	pseudos: {
+		// Potentially complex pseudos
+		"not": markFunction(function( selector ) {
+			// Trim the selector passed to compile
+			// to avoid treating leading and trailing
+			// spaces as combinators
+			var input = [],
+				results = [],
+				matcher = compile( selector.replace( rtrim, "$1" ) );
+
+			return matcher[ expando ] ?
+				markFunction(function( seed, matches, context, xml ) {
+					var elem,
+						unmatched = matcher( seed, null, xml, [] ),
+						i = seed.length;
+
+					// Match elements unmatched by `matcher`
+					while ( i-- ) {
+						if ( (elem = unmatched[i]) ) {
+							seed[i] = !(matches[i] = elem);
+						}
+					}
+				}) :
+				function( elem, context, xml ) {
+					input[0] = elem;
+					matcher( input, null, xml, results );
+					return !results.pop();
+				};
+		}),
+
+		"has": markFunction(function( selector ) {
+			return function( elem ) {
+				return Sizzle( selector, elem ).length > 0;
+			};
+		}),
+
+		"contains": markFunction(function( text ) {
+			return function( elem ) {
+				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+			};
+		}),
+
+		// "Whether an element is represented by a :lang() selector
+		// is based solely on the element's language value
+		// being equal to the identifier C,
+		// or beginning with the identifier C immediately followed by "-".
+		// The matching of C against the element's language value is performed case-insensitively.
+		// The identifier C does not have to be a valid language name."
+		// http://www.w3.org/TR/selectors/#lang-pseudo
+		"lang": markFunction( function( lang ) {
+			// lang value must be a valid identifier
+			if ( !ridentifier.test(lang || "") ) {
+				Sizzle.error( "unsupported lang: " + lang );
+			}
+			lang = lang.replace( runescape, funescape ).toLowerCase();
+			return function( elem ) {
+				var elemLang;
+				do {
+					if ( (elemLang = documentIsHTML ?
+						elem.lang :
+						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+						elemLang = elemLang.toLowerCase();
+						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+					}
+				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+				return false;
+			};
+		}),
+
+		// Miscellaneous
+		"target": function( elem ) {
+			var hash = window.location && window.location.hash;
+			return hash && hash.slice( 1 ) === elem.id;
+		},
+
+		"root": function( elem ) {
+			return elem === docElem;
+		},
+
+		"focus": function( elem ) {
+			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+		},
+
+		// Boolean properties
+		"enabled": function( elem ) {
+			return elem.disabled === false;
+		},
+
+		"disabled": function( elem ) {
+			return elem.disabled === true;
+		},
+
+		"checked": function( elem ) {
+			// In CSS3, :checked should return both checked and selected elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			var nodeName = elem.nodeName.toLowerCase();
+			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+		},
+
+		"selected": function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+
+			return elem.selected === true;
+		},
+
+		// Contents
+		"empty": function( elem ) {
+			// http://www.w3.org/TR/selectors/#empty-pseudo
+			// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+			//   not comment, processing instructions, or others
+			// Thanks to Diego Perini for the nodeName shortcut
+			//   Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+					return false;
+				}
+			}
+			return true;
+		},
+
+		"parent": function( elem ) {
+			return !Expr.pseudos["empty"]( elem );
+		},
+
+		// Element/input types
+		"header": function( elem ) {
+			return rheader.test( elem.nodeName );
+		},
+
+		"input": function( elem ) {
+			return rinputs.test( elem.nodeName );
+		},
+
+		"button": function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && elem.type === "button" || name === "button";
+		},
+
+		"text": function( elem ) {
+			var attr;
+			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+			// use getAttribute instead to test this case
+			return elem.nodeName.toLowerCase() === "input" &&
+				elem.type === "text" &&
+				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+		},
+
+		// Position-in-collection
+		"first": createPositionalPseudo(function() {
+			return [ 0 ];
+		}),
+
+		"last": createPositionalPseudo(function( matchIndexes, length ) {
+			return [ length - 1 ];
+		}),
+
+		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			return [ argument < 0 ? argument + length : argument ];
+		}),
+
+		"even": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 0;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"odd": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 1;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; --i >= 0; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; ++i < length; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		})
+	}
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+	Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+	Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+function tokenize( selector, parseOnly ) {
+	var matched, match, tokens, type,
+		soFar, groups, preFilters,
+		cached = tokenCache[ selector + " " ];
+
+	if ( cached ) {
+		return parseOnly ? 0 : cached.slice( 0 );
+	}
+
+	soFar = selector;
+	groups = [];
+	preFilters = Expr.preFilter;
+
+	while ( soFar ) {
+
+		// Comma and first run
+		if ( !matched || (match = rcomma.exec( soFar )) ) {
+			if ( match ) {
+				// Don't consume trailing commas as valid
+				soFar = soFar.slice( match[0].length ) || soFar;
+			}
+			groups.push( tokens = [] );
+		}
+
+		matched = false;
+
+		// Combinators
+		if ( (match = rcombinators.exec( soFar )) ) {
+			matched = match.shift();
+			tokens.push({
+				value: matched,
+				// Cast descendant combinators to space
+				type: match[0].replace( rtrim, " " )
+			});
+			soFar = soFar.slice( matched.length );
+		}
+
+		// Filters
+		for ( type in Expr.filter ) {
+			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+				(match = preFilters[ type ]( match ))) ) {
+				matched = match.shift();
+				tokens.push({
+					value: matched,
+					type: type,
+					matches: match
+				});
+				soFar = soFar.slice( matched.length );
+			}
+		}
+
+		if ( !matched ) {
+			break;
+		}
+	}
+
+	// Return the length of the invalid excess
+	// if we're just parsing
+	// Otherwise, throw an error or return tokens
+	return parseOnly ?
+		soFar.length :
+		soFar ?
+			Sizzle.error( selector ) :
+			// Cache the tokens
+			tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+	var i = 0,
+		len = tokens.length,
+		selector = "";
+	for ( ; i < len; i++ ) {
+		selector += tokens[i].value;
+	}
+	return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+	var dir = combinator.dir,
+		checkNonElements = base && dir === "parentNode",
+		doneName = done++;
+
+	return combinator.first ?
+		// Check against closest ancestor/preceding element
+		function( elem, context, xml ) {
+			while ( (elem = elem[ dir ]) ) {
+				if ( elem.nodeType === 1 || checkNonElements ) {
+					return matcher( elem, context, xml );
+				}
+			}
+		} :
+
+		// Check against all ancestor/preceding elements
+		function( elem, context, xml ) {
+			var data, cache, outerCache,
+				dirkey = dirruns + " " + doneName;
+
+			// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+			if ( xml ) {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						if ( matcher( elem, context, xml ) ) {
+							return true;
+						}
+					}
+				}
+			} else {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						outerCache = elem[ expando ] || (elem[ expando ] = {});
+						if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+							if ( (data = cache[1]) === true || data === cachedruns ) {
+								return data === true;
+							}
+						} else {
+							cache = outerCache[ dir ] = [ dirkey ];
+							cache[1] = matcher( elem, context, xml ) || cachedruns;
+							if ( cache[1] === true ) {
+								return true;
+							}
+						}
+					}
+				}
+			}
+		};
+}
+
+function elementMatcher( matchers ) {
+	return matchers.length > 1 ?
+		function( elem, context, xml ) {
+			var i = matchers.length;
+			while ( i-- ) {
+				if ( !matchers[i]( elem, context, xml ) ) {
+					return false;
+				}
+			}
+			return true;
+		} :
+		matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+	var elem,
+		newUnmatched = [],
+		i = 0,
+		len = unmatched.length,
+		mapped = map != null;
+
+	for ( ; i < len; i++ ) {
+		if ( (elem = unmatched[i]) ) {
+			if ( !filter || filter( elem, context, xml ) ) {
+				newUnmatched.push( elem );
+				if ( mapped ) {
+					map.push( i );
+				}
+			}
+		}
+	}
+
+	return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+	if ( postFilter && !postFilter[ expando ] ) {
+		postFilter = setMatcher( postFilter );
+	}
+	if ( postFinder && !postFinder[ expando ] ) {
+		postFinder = setMatcher( postFinder, postSelector );
+	}
+	return markFunction(function( seed, results, context, xml ) {
+		var temp, i, elem,
+			preMap = [],
+			postMap = [],
+			preexisting = results.length,
+
+			// Get initial elements from seed or context
+			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+			// Prefilter to get matcher input, preserving a map for seed-results synchronization
+			matcherIn = preFilter && ( seed || !selector ) ?
+				condense( elems, preMap, preFilter, context, xml ) :
+				elems,
+
+			matcherOut = matcher ?
+				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+					// ...intermediate processing is necessary
+					[] :
+
+					// ...otherwise use results directly
+					results :
+				matcherIn;
+
+		// Find primary matches
+		if ( matcher ) {
+			matcher( matcherIn, matcherOut, context, xml );
+		}
+
+		// Apply postFilter
+		if ( postFilter ) {
+			temp = condense( matcherOut, postMap );
+			postFilter( temp, [], context, xml );
+
+			// Un-match failing elements by moving them back to matcherIn
+			i = temp.length;
+			while ( i-- ) {
+				if ( (elem = temp[i]) ) {
+					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+				}
+			}
+		}
+
+		if ( seed ) {
+			if ( postFinder || preFilter ) {
+				if ( postFinder ) {
+					// Get the final matcherOut by condensing this intermediate into postFinder contexts
+					temp = [];
+					i = matcherOut.length;
+					while ( i-- ) {
+						if ( (elem = matcherOut[i]) ) {
+							// Restore matcherIn since elem is not yet a final match
+							temp.push( (matcherIn[i] = elem) );
+						}
+					}
+					postFinder( null, (matcherOut = []), temp, xml );
+				}
+
+				// Move matched elements from seed to results to keep them synchronized
+				i = matcherOut.length;
+				while ( i-- ) {
+					if ( (elem = matcherOut[i]) &&
+						(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+						seed[temp] = !(results[temp] = elem);
+					}
+				}
+			}
+
+		// Add elements to results, through postFinder if defined
+		} else {
+			matcherOut = condense(
+				matcherOut === results ?
+					matcherOut.splice( preexisting, matcherOut.length ) :
+					matcherOut
+			);
+			if ( postFinder ) {
+				postFinder( null, results, matcherOut, xml );
+			} else {
+				push.apply( results, matcherOut );
+			}
+		}
+	});
+}
+
+function matcherFromTokens( tokens ) {
+	var checkContext, matcher, j,
+		len = tokens.length,
+		leadingRelative = Expr.relative[ tokens[0].type ],
+		implicitRelative = leadingRelative || Expr.relative[" "],
+		i = leadingRelative ? 1 : 0,
+
+		// The foundational matcher ensures that elements are reachable from top-level context(s)
+		matchContext = addCombinator( function( elem ) {
+			return elem === checkContext;
+		}, implicitRelative, true ),
+		matchAnyContext = addCombinator( function( elem ) {
+			return indexOf.call( checkContext, elem ) > -1;
+		}, implicitRelative, true ),
+		matchers = [ function( elem, context, xml ) {
+			return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+				(checkContext = context).nodeType ?
+					matchContext( elem, context, xml ) :
+					matchAnyContext( elem, context, xml ) );
+		} ];
+
+	for ( ; i < len; i++ ) {
+		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+		} else {
+			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+			// Return special upon seeing a positional matcher
+			if ( matcher[ expando ] ) {
+				// Find the next relative operator (if any) for proper handling
+				j = ++i;
+				for ( ; j < len; j++ ) {
+					if ( Expr.relative[ tokens[j].type ] ) {
+						break;
+					}
+				}
+				return setMatcher(
+					i > 1 && elementMatcher( matchers ),
+					i > 1 && toSelector(
+						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
+						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+					).replace( rtrim, "$1" ),
+					matcher,
+					i < j && matcherFromTokens( tokens.slice( i, j ) ),
+					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+					j < len && toSelector( tokens )
+				);
+			}
+			matchers.push( matcher );
+		}
+	}
+
+	return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+	// A counter to specify which element is currently being matched
+	var matcherCachedRuns = 0,
+		bySet = setMatchers.length > 0,
+		byElement = elementMatchers.length > 0,
+		superMatcher = function( seed, context, xml, results, expandContext ) {
+			var elem, j, matcher,
+				setMatched = [],
+				matchedCount = 0,
+				i = "0",
+				unmatched = seed && [],
+				outermost = expandContext != null,
+				contextBackup = outermostContext,
+				// We must always have either seed elements or context
+				elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+				// Use integer dirruns iff this is the outermost matcher
+				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+			if ( outermost ) {
+				outermostContext = context !== document && context;
+				cachedruns = matcherCachedRuns;
+			}
+
+			// Add elements passing elementMatchers directly to results
+			// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+			for ( ; (elem = elems[i]) != null; i++ ) {
+				if ( byElement && elem ) {
+					j = 0;
+					while ( (matcher = elementMatchers[j++]) ) {
+						if ( matcher( elem, context, xml ) ) {
+							results.push( elem );
+							break;
+						}
+					}
+					if ( outermost ) {
+						dirruns = dirrunsUnique;
+						cachedruns = ++matcherCachedRuns;
+					}
+				}
+
+				// Track unmatched elements for set filters
+				if ( bySet ) {
+					// They will have gone through all possible matchers
+					if ( (elem = !matcher && elem) ) {
+						matchedCount--;
+					}
+
+					// Lengthen the array for every element, matched or not
+					if ( seed ) {
+						unmatched.push( elem );
+					}
+				}
+			}
+
+			// Apply set filters to unmatched elements
+			matchedCount += i;
+			if ( bySet && i !== matchedCount ) {
+				j = 0;
+				while ( (matcher = setMatchers[j++]) ) {
+					matcher( unmatched, setMatched, context, xml );
+				}
+
+				if ( seed ) {
+					// Reintegrate element matches to eliminate the need for sorting
+					if ( matchedCount > 0 ) {
+						while ( i-- ) {
+							if ( !(unmatched[i] || setMatched[i]) ) {
+								setMatched[i] = pop.call( results );
+							}
+						}
+					}
+
+					// Discard index placeholder values to get only actual matches
+					setMatched = condense( setMatched );
+				}
+
+				// Add matches to results
+				push.apply( results, setMatched );
+
+				// Seedless set matches succeeding multiple successful matchers stipulate sorting
+				if ( outermost && !seed && setMatched.length > 0 &&
+					( matchedCount + setMatchers.length ) > 1 ) {
+
+					Sizzle.uniqueSort( results );
+				}
+			}
+
+			// Override manipulation of globals by nested matchers
+			if ( outermost ) {
+				dirruns = dirrunsUnique;
+				outermostContext = contextBackup;
+			}
+
+			return unmatched;
+		};
+
+	return bySet ?
+		markFunction( superMatcher ) :
+		superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+	var i,
+		setMatchers = [],
+		elementMatchers = [],
+		cached = compilerCache[ selector + " " ];
+
+	if ( !cached ) {
+		// Generate a function of recursive functions that can be used to check each element
+		if ( !group ) {
+			group = tokenize( selector );
+		}
+		i = group.length;
+		while ( i-- ) {
+			cached = matcherFromTokens( group[i] );
+			if ( cached[ expando ] ) {
+				setMatchers.push( cached );
+			} else {
+				elementMatchers.push( cached );
+			}
+		}
+
+		// Cache the compiled function
+		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+	}
+	return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+	var i = 0,
+		len = contexts.length;
+	for ( ; i < len; i++ ) {
+		Sizzle( selector, contexts[i], results );
+	}
+	return results;
+}
+
+function select( selector, context, results, seed ) {
+	var i, tokens, token, type, find,
+		match = tokenize( selector );
+
+	if ( !seed ) {
+		// Try to minimize operations if there is only one group
+		if ( match.length === 1 ) {
+
+			// Take a shortcut and set the context if the root selector is an ID
+			tokens = match[0] = match[0].slice( 0 );
+			if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+					support.getById && context.nodeType === 9 && documentIsHTML &&
+					Expr.relative[ tokens[1].type ] ) {
+
+				context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+				if ( !context ) {
+					return results;
+				}
+				selector = selector.slice( tokens.shift().value.length );
+			}
+
+			// Fetch a seed set for right-to-left matching
+			i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+			while ( i-- ) {
+				token = tokens[i];
+
+				// Abort if we hit a combinator
+				if ( Expr.relative[ (type = token.type) ] ) {
+					break;
+				}
+				if ( (find = Expr.find[ type ]) ) {
+					// Search, expanding context for leading sibling combinators
+					if ( (seed = find(
+						token.matches[0].replace( runescape, funescape ),
+						rsibling.test( tokens[0].type ) && context.parentNode || context
+					)) ) {
+
+						// If seed is empty or no tokens remain, we can return early
+						tokens.splice( i, 1 );
+						selector = seed.length && toSelector( tokens );
+						if ( !selector ) {
+							push.apply( results, seed );
+							return results;
+						}
+
+						break;
+					}
+				}
+			}
+		}
+	}
+
+	// Compile and execute a filtering function
+	// Provide `match` to avoid retokenization if we modified the selector above
+	compile( selector, match )(
+		seed,
+		context,
+		!documentIsHTML,
+		results,
+		rsibling.test( selector )
+	);
+	return results;
+}
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+	// Should return 1, but returns 4 (following)
+	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+	div.innerHTML = "<a href='#'></a>";
+	return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+	addHandle( "type|href|height|width", function( elem, name, isXML ) {
+		if ( !isXML ) {
+			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+		}
+	});
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+	div.innerHTML = "<input/>";
+	div.firstChild.setAttribute( "value", "" );
+	return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+	addHandle( "value", function( elem, name, isXML ) {
+		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+			return elem.defaultValue;
+		}
+	});
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+	return div.getAttribute("disabled") == null;
+}) ) {
+	addHandle( booleans, function( elem, name, isXML ) {
+		var val;
+		if ( !isXML ) {
+			return (val = elem.getAttributeNode( name )) && val.specified ?
+				val.value :
+				elem[ name ] === true ? name.toLowerCase() : null;
+		}
+	});
+}
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+	var object = optionsCache[ options ] = {};
+	jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+		object[ flag ] = true;
+	});
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	options: an optional list of space-separated options that will change how
+ *			the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+	// Convert options from String-formatted to Object-formatted if needed
+	// (we check in cache first)
+	options = typeof options === "string" ?
+		( optionsCache[ options ] || createOptions( options ) ) :
+		jQuery.extend( {}, options );
+
+	var // Flag to know if list is currently firing
+		firing,
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list was already fired
+		fired,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = !options.once && [],
+		// Fire callbacks
+		fire = function( data ) {
+			memory = options.memory && data;
+			fired = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			firing = true;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+					memory = false; // To prevent further calls using add
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( stack ) {
+					if ( stack.length ) {
+						fire( stack.shift() );
+					}
+				} else if ( memory ) {
+					list = [];
+				} else {
+					self.disable();
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					// First, we save the current length
+					var start = list.length;
+					(function add( args ) {
+						jQuery.each( args, function( _, arg ) {
+							var type = jQuery.type( arg );
+							if ( type === "function" ) {
+								if ( !options.unique || !self.has( arg ) ) {
+									list.push( arg );
+								}
+							} else if ( arg && arg.length && type !== "string" ) {
+								// Inspect recursively
+								add( arg );
+							}
+						});
+					})( arguments );
+					// Do we need to add the callbacks to the
+					// current firing batch?
+					if ( firing ) {
+						firingLength = list.length;
+					// With memory, if we're not firing then
+					// we should call right away
+					} else if ( memory ) {
+						firingStart = start;
+						fire( memory );
+					}
+				}
+				return this;
+			},
+			// Remove a callback from the list
+			remove: function() {
+				if ( list ) {
+					jQuery.each( arguments, function( _, arg ) {
+						var index;
+						while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+							list.splice( index, 1 );
+							// Handle firing indexes
+							if ( firing ) {
+								if ( index <= firingLength ) {
+									firingLength--;
+								}
+								if ( index <= firingIndex ) {
+									firingIndex--;
+								}
+							}
+						}
+					});
+				}
+				return this;
+			},
+			// Check if a given callback is in the list.
+			// If no argument is given, return whether or not list has callbacks attached.
+			has: function( fn ) {
+				return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+			},
+			// Remove all callbacks from the list
+			empty: function() {
+				list = [];
+				firingLength = 0;
+				return this;
+			},
+			// Have the list do nothing anymore
+			disable: function() {
+				list = stack = memory = undefined;
+				return this;
+			},
+			// Is it disabled?
+			disabled: function() {
+				return !list;
+			},
+			// Lock the list in its current state
+			lock: function() {
+				stack = undefined;
+				if ( !memory ) {
+					self.disable();
+				}
+				return this;
+			},
+			// Is it locked?
+			locked: function() {
+				return !stack;
+			},
+			// Call all callbacks with the given context and arguments
+			fireWith: function( context, args ) {
+				if ( list && ( !fired || stack ) ) {
+					args = args || [];
+					args = [ context, args.slice ? args.slice() : args ];
+					if ( firing ) {
+						stack.push( args );
+					} else {
+						fire( args );
+					}
+				}
+				return this;
+			},
+			// Call all the callbacks with the given arguments
+			fire: function() {
+				self.fireWith( this, arguments );
+				return this;
+			},
+			// To know if the callbacks have already been called at least once
+			fired: function() {
+				return !!fired;
+			}
+		};
+
+	return self;
+};
+jQuery.extend({
+
+	Deferred: function( func ) {
+		var tuples = [
+				// action, add listener, listener list, final state
+				[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+				[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+				[ "notify", "progress", jQuery.Callbacks("memory") ]
+			],
+			state = "pending",
+			promise = {
+				state: function() {
+					return state;
+				},
+				always: function() {
+					deferred.done( arguments ).fail( arguments );
+					return this;
+				},
+				then: function( /* fnDone, fnFail, fnProgress */ ) {
+					var fns = arguments;
+					return jQuery.Deferred(function( newDefer ) {
+						jQuery.each( tuples, function( i, tuple ) {
+							var action = tuple[ 0 ],
+								fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+							// deferred[ done | fail | progress ] for forwarding actions to newDefer
+							deferred[ tuple[1] ](function() {
+								var returned = fn && fn.apply( this, arguments );
+								if ( returned && jQuery.isFunction( returned.promise ) ) {
+									returned.promise()
+										.done( newDefer.resolve )
+										.fail( newDefer.reject )
+										.progress( newDefer.notify );
+								} else {
+									newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+								}
+							});
+						});
+						fns = null;
+					}).promise();
+				},
+				// Get a promise for this deferred
+				// If obj is provided, the promise aspect is added to the object
+				promise: function( obj ) {
+					return obj != null ? jQuery.extend( obj, promise ) : promise;
+				}
+			},
+			deferred = {};
+
+		// Keep pipe for back-compat
+		promise.pipe = promise.then;
+
+		// Add list-specific methods
+		jQuery.each( tuples, function( i, tuple ) {
+			var list = tuple[ 2 ],
+				stateString = tuple[ 3 ];
+
+			// promise[ done | fail | progress ] = list.add
+			promise[ tuple[1] ] = list.add;
+
+			// Handle state
+			if ( stateString ) {
+				list.add(function() {
+					// state = [ resolved | rejected ]
+					state = stateString;
+
+				// [ reject_list | resolve_list ].disable; progress_list.lock
+				}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+			}
+
+			// deferred[ resolve | reject | notify ]
+			deferred[ tuple[0] ] = function() {
+				deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+				return this;
+			};
+			deferred[ tuple[0] + "With" ] = list.fireWith;
+		});
+
+		// Make the deferred a promise
+		promise.promise( deferred );
+
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+
+		// All done!
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( subordinate /* , ..., subordinateN */ ) {
+		var i = 0,
+			resolveValues = core_slice.call( arguments ),
+			length = resolveValues.length,
+
+			// the count of uncompleted subordinates
+			remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+			// the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+			deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+			// Update function for both resolve and progress values
+			updateFunc = function( i, contexts, values ) {
+				return function( value ) {
+					contexts[ i ] = this;
+					values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+					if( values === progressValues ) {
+						deferred.notifyWith( contexts, values );
+					} else if ( !( --remaining ) ) {
+						deferred.resolveWith( contexts, values );
+					}
+				};
+			},
+
+			progressValues, progressContexts, resolveContexts;
+
+		// add listeners to Deferred subordinates; treat others as resolved
+		if ( length > 1 ) {
+			progressValues = new Array( length );
+			progressContexts = new Array( length );
+			resolveContexts = new Array( length );
+			for ( ; i < length; i++ ) {
+				if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+					resolveValues[ i ].promise()
+						.done( updateFunc( i, resolveContexts, resolveValues ) )
+						.fail( deferred.reject )
+						.progress( updateFunc( i, progressContexts, progressValues ) );
+				} else {
+					--remaining;
+				}
+			}
+		}
+
+		// if we're not waiting on anything, resolve the master
+		if ( !remaining ) {
+			deferred.resolveWith( resolveContexts, resolveValues );
+		}
+
+		return deferred.promise();
+	}
+});
+jQuery.support = (function( support ) {
+
+	var all, a, input, select, fragment, opt, eventName, isSupported, i,
+		div = document.createElement("div");
+
+	// Setup
+	div.setAttribute( "className", "t" );
+	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+	// Finish early in limited (non-browser) environments
+	all = div.getElementsByTagName("*") || [];
+	a = div.getElementsByTagName("a")[ 0 ];
+	if ( !a || !a.style || !all.length ) {
+		return support;
+	}
+
+	// First batch of tests
+	select = document.createElement("select");
+	opt = select.appendChild( document.createElement("option") );
+	input = div.getElementsByTagName("input")[ 0 ];
+
+	a.style.cssText = "top:1px;float:left;opacity:.5";
+
+	// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+	support.getSetAttribute = div.className !== "t";
+
+	// IE strips leading whitespace when .innerHTML is used
+	support.leadingWhitespace = div.firstChild.nodeType === 3;
+
+	// Make sure that tbody elements aren't automatically inserted
+	// IE will insert them into empty tables
+	support.tbody = !div.getElementsByTagName("tbody").length;
+
+	// Make sure that link elements get serialized correctly by innerHTML
+	// This requires a wrapper element in IE
+	support.htmlSerialize = !!div.getElementsByTagName("link").length;
+
+	// Get the style information from getAttribute
+	// (IE uses .cssText instead)
+	support.style = /top/.test( a.getAttribute("style") );
+
+	// Make sure that URLs aren't manipulated
+	// (IE normalizes it by default)
+	support.hrefNormalized = a.getAttribute("href") === "/a";
+
+	// Make sure that element opacity exists
+	// (IE uses filter instead)
+	// Use a regex to work around a WebKit issue. See #5145
+	support.opacity = /^0.5/.test( a.style.opacity );
+
+	// Verify style float existence
+	// (IE uses styleFloat instead of cssFloat)
+	support.cssFloat = !!a.style.cssFloat;
+
+	// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+	support.checkOn = !!input.value;
+
+	// Make sure that a selected-by-default option has a working selected property.
+	// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+	support.optSelected = opt.selected;
+
+	// Tests for enctype support on a form (#6743)
+	support.enctype = !!document.createElement("form").enctype;
+
+	// Makes sure cloning an html5 element does not cause problems
+	// Where outerHTML is undefined, this still works
+	support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
+
+	// Will be defined later
+	support.inlineBlockNeedsLayout = false;
+	support.shrinkWrapBlocks = false;
+	support.pixelPosition = false;
+	support.deleteExpando = true;
+	support.noCloneEvent = true;
+	support.reliableMarginRight = true;
+	support.boxSizingReliable = true;
+
+	// Make sure checked status is properly cloned
+	input.checked = true;
+	support.noCloneChecked = input.cloneNode( true ).checked;
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as disabled)
+	select.disabled = true;
+	support.optDisabled = !opt.disabled;
+
+	// Support: IE<9
+	try {
+		delete div.test;
+	} catch( e ) {
+		support.deleteExpando = false;
+	}
+
+	// Check if we can trust getAttribute("value")
+	input = document.createElement("input");
+	input.setAttribute( "value", "" );
+	support.input = input.getAttribute( "value" ) === "";
+
+	// Check if an input maintains its value after becoming a radio
+	input.value = "t";
+	input.setAttribute( "type", "radio" );
+	support.radioValue = input.value === "t";
+
+	// #11217 - WebKit loses check when the name is after the checked attribute
+	input.setAttribute( "checked", "t" );
+	input.setAttribute( "name", "t" );
+
+	fragment = document.createDocumentFragment();
+	fragment.appendChild( input );
+
+	// Check if a disconnected checkbox will retain its checked
+	// value of true after appended to the DOM (IE6/7)
+	support.appendChecked = input.checked;
+
+	// WebKit doesn't clone checked state correctly in fragments
+	support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+	// Support: IE<9
+	// Opera does not clone events (and typeof div.attachEvent === undefined).
+	// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
+	if ( div.attachEvent ) {
+		div.attachEvent( "onclick", function() {
+			support.noCloneEvent = false;
+		});
+
+		div.cloneNode( true ).click();
+	}
+
+	// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
+	// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
+	for ( i in { submit: true, change: true, focusin: true }) {
+		div.setAttribute( eventName = "on" + i, "t" );
+
+		support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
+	}
+
+	div.style.backgroundClip = "content-box";
+	div.cloneNode( true ).style.backgroundClip = "";
+	support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+	// Support: IE<9
+	// Iteration over object's inherited properties before its own.
+	for ( i in jQuery( support ) ) {
+		break;
+	}
+	support.ownLast = i !== "0";
+
+	// Run tests that need a body at doc ready
+	jQuery(function() {
+		var container, marginDiv, tds,
+			divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
+			body = document.getElementsByTagName("body")[0];
+
+		if ( !body ) {
+			// Return for frameset docs that don't have a body
+			return;
+		}
+
+		container = document.createElement("div");
+		container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
+
+		body.appendChild( container ).appendChild( div );
+
+		// Support: IE8
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+		tds = div.getElementsByTagName("td");
+		tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+		isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+		tds[ 0 ].style.display = "";
+		tds[ 1 ].style.display = "none";
+
+		// Support: IE8
+		// Check if empty table cells still have offsetWidth/Height
+		support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+		// Check box-sizing and margin behavior.
+		div.innerHTML = "";
+		div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+
+		// Workaround failing boxSizing test due to offsetWidth returning wrong value
+		// with some non-1 values of body zoom, ticket #13543
+		jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
+			support.boxSizing = div.offsetWidth === 4;
+		});
+
+		// Use window.getComputedStyle because jsdom on node.js will break without it.
+		if ( window.getComputedStyle ) {
+			support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+			support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+			// Check if div with explicit width and no margin-right incorrectly
+			// gets computed margin-right based on width of container. (#3333)
+			// Fails in WebKit before Feb 2011 nightlies
+			// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+			marginDiv = div.appendChild( document.createElement("div") );
+			marginDiv.style.cssText = div.style.cssText = divReset;
+			marginDiv.style.marginRight = marginDiv.style.width = "0";
+			div.style.width = "1px";
+
+			support.reliableMarginRight =
+				!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+		}
+
+		if ( typeof div.style.zoom !== core_strundefined ) {
+			// Support: IE<8
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			div.innerHTML = "";
+			div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+			support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+			// Support: IE6
+			// Check if elements with layout shrink-wrap their children
+			div.style.display = "block";
+			div.innerHTML = "<div></div>";
+			div.firstChild.style.width = "5px";
+			support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+			if ( support.inlineBlockNeedsLayout ) {
+				// Prevent IE 6 from affecting layout for positioned elements #11048
+				// Prevent IE from shrinking the body in IE 7 mode #12869
+				// Support: IE<8
+				body.style.zoom = 1;
+			}
+		}
+
+		body.removeChild( container );
+
+		// Null elements to avoid leaks in IE
+		container = div = tds = marginDiv = null;
+	});
+
+	// Null elements to avoid leaks in IE
+	all = select = fragment = opt = a = input = null;
+
+	return support;
+})({});
+
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+	rmultiDash = /([A-Z])/g;
+
+function internalData( elem, name, data, pvt /* Internal Use Only */ ){
+	if ( !jQuery.acceptData( elem ) ) {
+		return;
+	}
+
+	var ret, thisCache,
+		internalKey = jQuery.expando,
+
+		// We have to handle DOM nodes and JS objects differently because IE6-7
+		// can't GC object references properly across the DOM-JS boundary
+		isNode = elem.nodeType,
+
+		// Only DOM nodes need the global jQuery cache; JS object data is
+		// attached directly to the object so GC can occur automatically
+		cache = isNode ? jQuery.cache : elem,
+
+		// Only defining an ID for JS objects if its cache already exists allows
+		// the code to shortcut on the same path as a DOM node with no cache
+		id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+	// Avoid doing any more work than we need to when trying to get data on an
+	// object that has no data at all
+	if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
+		return;
+	}
+
+	if ( !id ) {
+		// Only DOM nodes need a new unique ID for each element since their data
+		// ends up in the global cache
+		if ( isNode ) {
+			id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
+		} else {
+			id = internalKey;
+		}
+	}
+
+	if ( !cache[ id ] ) {
+		// Avoid exposing jQuery metadata on plain JS objects when the object
+		// is serialized using JSON.stringify
+		cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
+	}
+
+	// An object can be passed to jQuery.data instead of a key/value pair; this gets
+	// shallow copied over onto the existing cache
+	if ( typeof name === "object" || typeof name === "function" ) {
+		if ( pvt ) {
+			cache[ id ] = jQuery.extend( cache[ id ], name );
+		} else {
+			cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+		}
+	}
+
+	thisCache = cache[ id ];
+
+	// jQuery data() is stored in a separate object inside the object's internal data
+	// cache in order to avoid key collisions between internal data and user-defined
+	// data.
+	if ( !pvt ) {
+		if ( !thisCache.data ) {
+			thisCache.data = {};
+		}
+
+		thisCache = thisCache.data;
+	}
+
+	if ( data !== undefined ) {
+		thisCache[ jQuery.camelCase( name ) ] = data;
+	}
+
+	// Check for both converted-to-camel and non-converted data property names
+	// If a data property was specified
+	if ( typeof name === "string" ) {
+
+		// First Try to find as-is property data
+		ret = thisCache[ name ];
+
+		// Test for null|undefined property data
+		if ( ret == null ) {
+
+			// Try to find the camelCased property
+			ret = thisCache[ jQuery.camelCase( name ) ];
+		}
+	} else {
+		ret = thisCache;
+	}
+
+	return ret;
+}
+
+function internalRemoveData( elem, name, pvt ) {
+	if ( !jQuery.acceptData( elem ) ) {
+		return;
+	}
+
+	var thisCache, i,
+		isNode = elem.nodeType,
+
+		// See jQuery.data for more information
+		cache = isNode ? jQuery.cache : elem,
+		id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+	// If there is already no cache entry for this object, there is no
+	// purpose in continuing
+	if ( !cache[ id ] ) {
+		return;
+	}
+
+	if ( name ) {
+
+		thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+		if ( thisCache ) {
+
+			// Support array or space separated string names for data keys
+			if ( !jQuery.isArray( name ) ) {
+
+				// try the string as a key before any manipulation
+				if ( name in thisCache ) {
+					name = [ name ];
+				} else {
+
+					// split the camel cased version by spaces unless a key with the spaces exists
+					name = jQuery.camelCase( name );
+					if ( name in thisCache ) {
+						name = [ name ];
+					} else {
+						name = name.split(" ");
+					}
+				}
+			} else {
+				// If "name" is an array of keys...
+				// When data is initially created, via ("key", "val") signature,
+				// keys will be converted to camelCase.
+				// Since there is no way to tell _how_ a key was added, remove
+				// both plain key and camelCase key. #12786
+				// This will only penalize the array argument path.
+				name = name.concat( jQuery.map( name, jQuery.camelCase ) );
+			}
+
+			i = name.length;
+			while ( i-- ) {
+				delete thisCache[ name[i] ];
+			}
+
+			// If there is no data left in the cache, we want to continue
+			// and let the cache object itself get destroyed
+			if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
+				return;
+			}
+		}
+	}
+
+	// See jQuery.data for more information
+	if ( !pvt ) {
+		delete cache[ id ].data;
+
+		// Don't destroy the parent cache unless the internal data object
+		// had been the only thing left in it
+		if ( !isEmptyDataObject( cache[ id ] ) ) {
+			return;
+		}
+	}
+
+	// Destroy the cache
+	if ( isNode ) {
+		jQuery.cleanData( [ elem ], true );
+
+	// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+	/* jshint eqeqeq: false */
+	} else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+		/* jshint eqeqeq: true */
+		delete cache[ id ];
+
+	// When all else fails, null
+	} else {
+		cache[ id ] = null;
+	}
+}
+
+jQuery.extend({
+	cache: {},
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"applet": true,
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+	},
+
+	hasData: function( elem ) {
+		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+		return !!elem && !isEmptyDataObject( elem );
+	},
+
+	data: function( elem, name, data ) {
+		return internalData( elem, name, data );
+	},
+
+	removeData: function( elem, name ) {
+		return internalRemoveData( elem, name );
+	},
+
+	// For internal use only.
+	_data: function( elem, name, data ) {
+		return internalData( elem, name, data, true );
+	},
+
+	_removeData: function( elem, name ) {
+		return internalRemoveData( elem, name, true );
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		// Do not set data on non-element because it will not be cleared (#8335).
+		if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
+			return false;
+		}
+
+		var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+		// nodes accept data unless otherwise specified; rejection can be conditional
+		return !noData || noData !== true && elem.getAttribute("classid") === noData;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var attrs, name,
+			data = null,
+			i = 0,
+			elem = this[0];
+
+		// Special expections of .data basically thwart jQuery.access,
+		// so implement the relevant behavior ourselves
+
+		// Gets all values
+		if ( key === undefined ) {
+			if ( this.length ) {
+				data = jQuery.data( elem );
+
+				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+					attrs = elem.attributes;
+					for ( ; i < attrs.length; i++ ) {
+						name = attrs[i].name;
+
+						if ( name.indexOf("data-") === 0 ) {
+							name = jQuery.camelCase( name.slice(5) );
+
+							dataAttr( elem, name, data[ name ] );
+						}
+					}
+					jQuery._data( elem, "parsedAttrs", true );
+				}
+			}
+
+			return data;
+		}
+
+		// Sets multiple values
+		if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		return arguments.length > 1 ?
+
+			// Sets one value
+			this.each(function() {
+				jQuery.data( this, key, value );
+			}) :
+
+			// Gets one value
+			// Try to fetch any internally stored data first
+			elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+
+		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+		data = elem.getAttribute( name );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+					data === "false" ? false :
+					data === "null" ? null :
+					// Only convert to a number if it doesn't change the string
+					+data + "" === data ? +data :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+						data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+	var name;
+	for ( name in obj ) {
+
+		// if the public data object is empty, the private is still empty
+		if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+			continue;
+		}
+		if ( name !== "toJSON" ) {
+			return false;
+		}
+	}
+
+	return true;
+}
+jQuery.extend({
+	queue: function( elem, type, data ) {
+		var queue;
+
+		if ( elem ) {
+			type = ( type || "fx" ) + "queue";
+			queue = jQuery._data( elem, type );
+
+			// Speed up dequeue by getting out quickly if this is just a lookup
+			if ( data ) {
+				if ( !queue || jQuery.isArray(data) ) {
+					queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+				} else {
+					queue.push( data );
+				}
+			}
+			return queue || [];
+		}
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			startLength = queue.length,
+			fn = queue.shift(),
+			hooks = jQuery._queueHooks( elem, type ),
+			next = function() {
+				jQuery.dequeue( elem, type );
+			};
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+			startLength--;
+		}
+
+		if ( fn ) {
+
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift( "inprogress" );
+			}
+
+			// clear up the last queue stop function
+			delete hooks.stop;
+			fn.call( elem, next, hooks );
+		}
+
+		if ( !startLength && hooks ) {
+			hooks.empty.fire();
+		}
+	},
+
+	// not intended for public consumption - generates a queueHooks object, or returns the current one
+	_queueHooks: function( elem, type ) {
+		var key = type + "queueHooks";
+		return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+			empty: jQuery.Callbacks("once memory").add(function() {
+				jQuery._removeData( elem, type + "queue" );
+				jQuery._removeData( elem, key );
+			})
+		});
+	}
+});
+
+jQuery.fn.extend({
+	queue: function( type, data ) {
+		var setter = 2;
+
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+			setter--;
+		}
+
+		if ( arguments.length < setter ) {
+			return jQuery.queue( this[0], type );
+		}
+
+		return data === undefined ?
+			this :
+			this.each(function() {
+				var queue = jQuery.queue( this, type, data );
+
+				// ensure a hooks for this queue
+				jQuery._queueHooks( this, type );
+
+				if ( type === "fx" && queue[0] !== "inprogress" ) {
+					jQuery.dequeue( this, type );
+				}
+			});
+	},
+	dequeue: function( type ) {
+		return this.each(function() {
+			jQuery.dequeue( this, type );
+		});
+	},
+	// Based off of the plugin by Clint Helfers, with permission.
+	// http://blindsignals.com/index.php/2009/07/jquery-delay/
+	delay: function( time, type ) {
+		time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+		type = type || "fx";
+
+		return this.queue( type, function( next, hooks ) {
+			var timeout = setTimeout( next, time );
+			hooks.stop = function() {
+				clearTimeout( timeout );
+			};
+		});
+	},
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	},
+	// Get a promise resolved when queues of a certain type
+	// are emptied (fx is the type by default)
+	promise: function( type, obj ) {
+		var tmp,
+			count = 1,
+			defer = jQuery.Deferred(),
+			elements = this,
+			i = this.length,
+			resolve = function() {
+				if ( !( --count ) ) {
+					defer.resolveWith( elements, [ elements ] );
+				}
+			};
+
+		if ( typeof type !== "string" ) {
+			obj = type;
+			type = undefined;
+		}
+		type = type || "fx";
+
+		while( i-- ) {
+			tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+			if ( tmp && tmp.empty ) {
+				count++;
+				tmp.empty.add( resolve );
+			}
+		}
+		resolve();
+		return defer.promise( obj );
+	}
+});
+var nodeHook, boolHook,
+	rclass = /[\t\r\n\f]/g,
+	rreturn = /\r/g,
+	rfocusable = /^(?:input|select|textarea|button|object)$/i,
+	rclickable = /^(?:a|area)$/i,
+	ruseDefault = /^(?:checked|selected)$/i,
+	getSetAttribute = jQuery.support.getSetAttribute,
+	getSetInput = jQuery.support.input;
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+	},
+
+	removeAttr: function( name ) {
+		return this.each(function() {
+			jQuery.removeAttr( this, name );
+		});
+	},
+
+	prop: function( name, value ) {
+		return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+	},
+
+	removeProp: function( name ) {
+		name = jQuery.propFix[ name ] || name;
+		return this.each(function() {
+			// try/catch handles cases where IE balks (such as removing a property on window)
+			try {
+				this[ name ] = undefined;
+				delete this[ name ];
+			} catch( e ) {}
+		});
+	},
+
+	addClass: function( value ) {
+		var classes, elem, cur, clazz, j,
+			i = 0,
+			len = this.length,
+			proceed = typeof value === "string" && value;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).addClass( value.call( this, j, this.className ) );
+			});
+		}
+
+		if ( proceed ) {
+			// The disjunction here is for better compressibility (see removeClass)
+			classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+			for ( ; i < len; i++ ) {
+				elem = this[ i ];
+				cur = elem.nodeType === 1 && ( elem.className ?
+					( " " + elem.className + " " ).replace( rclass, " " ) :
+					" "
+				);
+
+				if ( cur ) {
+					j = 0;
+					while ( (clazz = classes[j++]) ) {
+						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+							cur += clazz + " ";
+						}
+					}
+					elem.className = jQuery.trim( cur );
+
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		var classes, elem, cur, clazz, j,
+			i = 0,
+			len = this.length,
+			proceed = arguments.length === 0 || typeof value === "string" && value;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).removeClass( value.call( this, j, this.className ) );
+			});
+		}
+		if ( proceed ) {
+			classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+			for ( ; i < len; i++ ) {
+				elem = this[ i ];
+				// This expression is here for better compressibility (see addClass)
+				cur = elem.nodeType === 1 && ( elem.className ?
+					( " " + elem.className + " " ).replace( rclass, " " ) :
+					""
+				);
+
+				if ( cur ) {
+					j = 0;
+					while ( (clazz = classes[j++]) ) {
+						// Remove *all* instances
+						while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+							cur = cur.replace( " " + clazz + " ", " " );
+						}
+					}
+					elem.className = value ? jQuery.trim( cur ) : "";
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value;
+
+		if ( typeof stateVal === "boolean" && type === "string" ) {
+			return stateVal ? this.addClass( value ) : this.removeClass( value );
+		}
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( i ) {
+				jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+			});
+		}
+
+		return this.each(function() {
+			if ( type === "string" ) {
+				// toggle individual class names
+				var className,
+					i = 0,
+					self = jQuery( this ),
+					classNames = value.match( core_rnotwhite ) || [];
+
+				while ( (className = classNames[ i++ ]) ) {
+					// check each className given, space separated list
+					if ( self.hasClass( className ) ) {
+						self.removeClass( className );
+					} else {
+						self.addClass( className );
+					}
+				}
+
+			// Toggle whole class name
+			} else if ( type === core_strundefined || type === "boolean" ) {
+				if ( this.className ) {
+					// store className if set
+					jQuery._data( this, "__className__", this.className );
+				}
+
+				// If the element has a class name or if we're passed "false",
+				// then remove the whole classname (if there was one, the above saved it).
+				// Otherwise bring back whatever was previously saved (if anything),
+				// falling back to the empty string if nothing was stored.
+				this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+			}
+		});
+	},
+
+	hasClass: function( selector ) {
+		var className = " " + selector + " ",
+			i = 0,
+			l = this.length;
+		for ( ; i < l; i++ ) {
+			if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		var ret, hooks, isFunction,
+			elem = this[0];
+
+		if ( !arguments.length ) {
+			if ( elem ) {
+				hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+					return ret;
+				}
+
+				ret = elem.value;
+
+				return typeof ret === "string" ?
+					// handle most common string cases
+					ret.replace(rreturn, "") :
+					// handle cases where value is null/undef or number
+					ret == null ? "" : ret;
+			}
+
+			return;
+		}
+
+		isFunction = jQuery.isFunction( value );
+
+		return this.each(function( i ) {
+			var val;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call( this, i, jQuery( this ).val() );
+			} else {
+				val = value;
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray( val ) ) {
+				val = jQuery.map(val, function ( value ) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+			// If set returns undefined, fall back to normal setting
+			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	valHooks: {
+		option: {
+			get: function( elem ) {
+				// Use proper attribute retrieval(#6932, #12072)
+				var val = jQuery.find.attr( elem, "value" );
+				return val != null ?
+					val :
+					elem.text;
+			}
+		},
+		select: {
+			get: function( elem ) {
+				var value, option,
+					options = elem.options,
+					index = elem.selectedIndex,
+					one = elem.type === "select-one" || index < 0,
+					values = one ? null : [],
+					max = one ? index + 1 : options.length,
+					i = index < 0 ?
+						max :
+						one ? index : 0;
+
+				// Loop through all the selected options
+				for ( ; i < max; i++ ) {
+					option = options[ i ];
+
+					// oldIE doesn't update selected after form reset (#2551)
+					if ( ( option.selected || i === index ) &&
+							// Don't return options that are disabled or in a disabled optgroup
+							( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+							( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+						// Get the specific value for the option
+						value = jQuery( option ).val();
+
+						// We don't need an array for one selects
+						if ( one ) {
+							return value;
+						}
+
+						// Multi-Selects return an array
+						values.push( value );
+					}
+				}
+
+				return values;
+			},
+
+			set: function( elem, value ) {
+				var optionSet, option,
+					options = elem.options,
+					values = jQuery.makeArray( value ),
+					i = options.length;
+
+				while ( i-- ) {
+					option = options[ i ];
+					if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
+						optionSet = true;
+					}
+				}
+
+				// force browsers to behave consistently when non-matching value is set
+				if ( !optionSet ) {
+					elem.selectedIndex = -1;
+				}
+				return values;
+			}
+		}
+	},
+
+	attr: function( elem, name, value ) {
+		var hooks, ret,
+			nType = elem.nodeType;
+
+		// don't get/set attributes on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		// Fallback to prop when attributes are not supported
+		if ( typeof elem.getAttribute === core_strundefined ) {
+			return jQuery.prop( elem, name, value );
+		}
+
+		// All attributes are lowercase
+		// Grab necessary hook if one is defined
+		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+			name = name.toLowerCase();
+			hooks = jQuery.attrHooks[ name ] ||
+				( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+		}
+
+		if ( value !== undefined ) {
+
+			if ( value === null ) {
+				jQuery.removeAttr( elem, name );
+
+			} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				elem.setAttribute( name, value + "" );
+				return value;
+			}
+
+		} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+			return ret;
+
+		} else {
+			ret = jQuery.find.attr( elem, name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return ret == null ?
+				undefined :
+				ret;
+		}
+	},
+
+	removeAttr: function( elem, value ) {
+		var name, propName,
+			i = 0,
+			attrNames = value && value.match( core_rnotwhite );
+
+		if ( attrNames && elem.nodeType === 1 ) {
+			while ( (name = attrNames[i++]) ) {
+				propName = jQuery.propFix[ name ] || name;
+
+				// Boolean attributes get special treatment (#10870)
+				if ( jQuery.expr.match.bool.test( name ) ) {
+					// Set corresponding property to false
+					if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+						elem[ propName ] = false;
+					// Support: IE<9
+					// Also clear defaultChecked/defaultSelected (if appropriate)
+					} else {
+						elem[ jQuery.camelCase( "default-" + name ) ] =
+							elem[ propName ] = false;
+					}
+
+				// See #9699 for explanation of this approach (setting first, then removal)
+				} else {
+					jQuery.attr( elem, name, "" );
+				}
+
+				elem.removeAttribute( getSetAttribute ? name : propName );
+			}
+		}
+	},
+
+	attrHooks: {
+		type: {
+			set: function( elem, value ) {
+				if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+					// Setting the type on a radio button after the value resets the value in IE6-9
+					// Reset value to default in case type is set after value during creation
+					var val = elem.value;
+					elem.setAttribute( "type", value );
+					if ( val ) {
+						elem.value = val;
+					}
+					return value;
+				}
+			}
+		}
+	},
+
+	propFix: {
+		"for": "htmlFor",
+		"class": "className"
+	},
+
+	prop: function( elem, name, value ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set properties on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		if ( notxml ) {
+			// Fix name and attach hooks
+			name = jQuery.propFix[ name ] || name;
+			hooks = jQuery.propHooks[ name ];
+		}
+
+		if ( value !== undefined ) {
+			return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+				ret :
+				( elem[ name ] = value );
+
+		} else {
+			return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+				ret :
+				elem[ name ];
+		}
+	},
+
+	propHooks: {
+		tabIndex: {
+			get: function( elem ) {
+				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+				// Use proper attribute retrieval(#12072)
+				var tabindex = jQuery.find.attr( elem, "tabindex" );
+
+				return tabindex ?
+					parseInt( tabindex, 10 ) :
+					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+						0 :
+						-1;
+			}
+		}
+	}
+});
+
+// Hooks for boolean attributes
+boolHook = {
+	set: function( elem, value, name ) {
+		if ( value === false ) {
+			// Remove boolean attributes when set to false
+			jQuery.removeAttr( elem, name );
+		} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+			// IE<8 needs the *property* name
+			elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
+
+		// Use defaultChecked and defaultSelected for oldIE
+		} else {
+			elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
+		}
+
+		return name;
+	}
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+	var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
+
+	jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
+		function( elem, name, isXML ) {
+			var fn = jQuery.expr.attrHandle[ name ],
+				ret = isXML ?
+					undefined :
+					/* jshint eqeqeq: false */
+					(jQuery.expr.attrHandle[ name ] = undefined) !=
+						getter( elem, name, isXML ) ?
+
+						name.toLowerCase() :
+						null;
+			jQuery.expr.attrHandle[ name ] = fn;
+			return ret;
+		} :
+		function( elem, name, isXML ) {
+			return isXML ?
+				undefined :
+				elem[ jQuery.camelCase( "default-" + name ) ] ?
+					name.toLowerCase() :
+					null;
+		};
+});
+
+// fix oldIE attroperties
+if ( !getSetInput || !getSetAttribute ) {
+	jQuery.attrHooks.value = {
+		set: function( elem, value, name ) {
+			if ( jQuery.nodeName( elem, "input" ) ) {
+				// Does not return so that setAttribute is also used
+				elem.defaultValue = value;
+			} else {
+				// Use nodeHook if defined (#1954); otherwise setAttribute is fine
+				return nodeHook && nodeHook.set( elem, value, name );
+			}
+		}
+	};
+}
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+	// Use this for any attribute in IE6/7
+	// This fixes almost every IE6/7 issue
+	nodeHook = {
+		set: function( elem, value, name ) {
+			// Set the existing or create a new attribute node
+			var ret = elem.getAttributeNode( name );
+			if ( !ret ) {
+				elem.setAttributeNode(
+					(ret = elem.ownerDocument.createAttribute( name ))
+				);
+			}
+
+			ret.value = value += "";
+
+			// Break association with cloned elements by also using setAttribute (#9646)
+			return name === "value" || value === elem.getAttribute( name ) ?
+				value :
+				undefined;
+		}
+	};
+	jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
+		// Some attributes are constructed with empty-string values when not defined
+		function( elem, name, isXML ) {
+			var ret;
+			return isXML ?
+				undefined :
+				(ret = elem.getAttributeNode( name )) && ret.value !== "" ?
+					ret.value :
+					null;
+		};
+	jQuery.valHooks.button = {
+		get: function( elem, name ) {
+			var ret = elem.getAttributeNode( name );
+			return ret && ret.specified ?
+				ret.value :
+				undefined;
+		},
+		set: nodeHook.set
+	};
+
+	// Set contenteditable to false on removals(#10429)
+	// Setting to empty string throws an error as an invalid value
+	jQuery.attrHooks.contenteditable = {
+		set: function( elem, value, name ) {
+			nodeHook.set( elem, value === "" ? false : value, name );
+		}
+	};
+
+	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
+	// This is for removals
+	jQuery.each([ "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = {
+			set: function( elem, value ) {
+				if ( value === "" ) {
+					elem.setAttribute( name, "auto" );
+					return value;
+				}
+			}
+		};
+	});
+}
+
+
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !jQuery.support.hrefNormalized ) {
+	// href/src property should get the full normalized URL (#10299/#12915)
+	jQuery.each([ "href", "src" ], function( i, name ) {
+		jQuery.propHooks[ name ] = {
+			get: function( elem ) {
+				return elem.getAttribute( name, 4 );
+			}
+		};
+	});
+}
+
+if ( !jQuery.support.style ) {
+	jQuery.attrHooks.style = {
+		get: function( elem ) {
+			// Return undefined in the case of empty string
+			// Note: IE uppercases css property names, but if we were to .toLowerCase()
+			// .cssText, that would destroy case senstitivity in URL's, like in "background"
+			return elem.style.cssText || undefined;
+		},
+		set: function( elem, value ) {
+			return ( elem.style.cssText = value + "" );
+		}
+	};
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+	jQuery.propHooks.selected = {
+		get: function( elem ) {
+			var parent = elem.parentNode;
+
+			if ( parent ) {
+				parent.selectedIndex;
+
+				// Make sure that it also works with optgroups, see #5701
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+			return null;
+		}
+	};
+}
+
+jQuery.each([
+	"tabIndex",
+	"readOnly",
+	"maxLength",
+	"cellSpacing",
+	"cellPadding",
+	"rowSpan",
+	"colSpan",
+	"useMap",
+	"frameBorder",
+	"contentEditable"
+], function() {
+	jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+	jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+	jQuery.valHooks[ this ] = {
+		set: function( elem, value ) {
+			if ( jQuery.isArray( value ) ) {
+				return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+			}
+		}
+	};
+	if ( !jQuery.support.checkOn ) {
+		jQuery.valHooks[ this ].get = function( elem ) {
+			// Support: Webkit
+			// "" is returned instead of "on" if a value isn't specified
+			return elem.getAttribute("value") === null ? "on" : elem.value;
+		};
+	}
+});
+var rformElems = /^(?:input|select|textarea)$/i,
+	rkeyEvent = /^key/,
+	rmouseEvent = /^(?:mouse|contextmenu)|click/,
+	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+	rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+	return true;
+}
+
+function returnFalse() {
+	return false;
+}
+
+function safeActiveElement() {
+	try {
+		return document.activeElement;
+	} catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+	global: {},
+
+	add: function( elem, types, handler, data, selector ) {
+		var tmp, events, t, handleObjIn,
+			special, eventHandle, handleObj,
+			handlers, type, namespaces, origType,
+			elemData = jQuery._data( elem );
+
+		// Don't attach events to noData or text/comment nodes (but allow plain objects)
+		if ( !elemData ) {
+			return;
+		}
+
+		// Caller can pass in an object of custom data in lieu of the handler
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+			selector = handleObjIn.selector;
+		}
+
+		// Make sure that the handler has a unique ID, used to find/remove it later
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure and main handler, if this is the first
+		if ( !(events = elemData.events) ) {
+			events = elemData.events = {};
+		}
+		if ( !(eventHandle = elemData.handle) ) {
+			eventHandle = elemData.handle = function( e ) {
+				// Discard the second event of a jQuery.event.trigger() and
+				// when an event is called after a page has unloaded
+				return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
+					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+			// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+			eventHandle.elem = elem;
+		}
+
+		// Handle multiple events separated by a space
+		types = ( types || "" ).match( core_rnotwhite ) || [""];
+		t = types.length;
+		while ( t-- ) {
+			tmp = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tmp[1];
+			namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+			// There *must* be a type, no attaching namespace-only handlers
+			if ( !type ) {
+				continue;
+			}
+
+			// If event changes its type, use the special event handlers for the changed type
+			special = jQuery.event.special[ type ] || {};
+
+			// If selector defined, determine special event api type, otherwise given type
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+
+			// Update special based on newly reset type
+			special = jQuery.event.special[ type ] || {};
+
+			// handleObj is passed to all event handlers
+			handleObj = jQuery.extend({
+				type: type,
+				origType: origType,
+				data: data,
+				handler: handler,
+				guid: handler.guid,
+				selector: selector,
+				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+				namespace: namespaces.join(".")
+			}, handleObjIn );
+
+			// Init the event handler queue if we're the first
+			if ( !(handlers = events[ type ]) ) {
+				handlers = events[ type ] = [];
+				handlers.delegateCount = 0;
+
+				// Only use addEventListener/attachEvent if the special events handler returns false
+				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add to the element's handler list, delegates in front
+			if ( selector ) {
+				handlers.splice( handlers.delegateCount++, 0, handleObj );
+			} else {
+				handlers.push( handleObj );
+			}
+
+			// Keep track of which events have ever been used, for event optimization
+			jQuery.event.global[ type ] = true;
+		}
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, selector, mappedTypes ) {
+		var j, handleObj, tmp,
+			origCount, t, events,
+			special, handlers, type,
+			namespaces, origType,
+			elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+		if ( !elemData || !(events = elemData.events) ) {
+			return;
+		}
+
+		// Once for each type.namespace in types; type may be omitted
+		types = ( types || "" ).match( core_rnotwhite ) || [""];
+		t = types.length;
+		while ( t-- ) {
+			tmp = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tmp[1];
+			namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+			// Unbind all events (on this namespace, if provided) for the element
+			if ( !type ) {
+				for ( type in events ) {
+					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+				}
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+			handlers = events[ type ] || [];
+			tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+			// Remove matching events
+			origCount = j = handlers.length;
+			while ( j-- ) {
+				handleObj = handlers[ j ];
+
+				if ( ( mappedTypes || origType === handleObj.origType ) &&
+					( !handler || handler.guid === handleObj.guid ) &&
+					( !tmp || tmp.test( handleObj.namespace ) ) &&
+					( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+					handlers.splice( j, 1 );
+
+					if ( handleObj.selector ) {
+						handlers.delegateCount--;
+					}
+					if ( special.remove ) {
+						special.remove.call( elem, handleObj );
+					}
+				}
+			}
+
+			// Remove generic event handler if we removed something and no more handlers exist
+			// (avoids potential for endless recursion during removal of special event handlers)
+			if ( origCount && !handlers.length ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			delete elemData.handle;
+
+			// removeData also checks for emptiness and clears the expando if empty
+			// so use it instead of delete
+			jQuery._removeData( elem, "events" );
+		}
+	},
+
+	trigger: function( event, data, elem, onlyHandlers ) {
+		var handle, ontype, cur,
+			bubbleType, special, tmp, i,
+			eventPath = [ elem || document ],
+			type = core_hasOwn.call( event, "type" ) ? event.type : event,
+			namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+		cur = tmp = elem = elem || document;
+
+		// Don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		// focus/blur morphs to focusin/out; ensure we're not firing them right now
+		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+			return;
+		}
+
+		if ( type.indexOf(".") >= 0 ) {
+			// Namespaced trigger; create a regexp to match event type in handle()
+			namespaces = type.split(".");
+			type = namespaces.shift();
+			namespaces.sort();
+		}
+		ontype = type.indexOf(":") < 0 && "on" + type;
+
+		// Caller can pass in a jQuery.Event object, Object, or just an event type string
+		event = event[ jQuery.expando ] ?
+			event :
+			new jQuery.Event( type, typeof event === "object" && event );
+
+		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+		event.isTrigger = onlyHandlers ? 2 : 3;
+		event.namespace = namespaces.join(".");
+		event.namespace_re = event.namespace ?
+			new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+			null;
+
+		// Clean up the event in case it is being reused
+		event.result = undefined;
+		if ( !event.target ) {
+			event.target = elem;
+		}
+
+		// Clone any incoming data and prepend the event, creating the handler arg list
+		data = data == null ?
+			[ event ] :
+			jQuery.makeArray( data, [ event ] );
+
+		// Allow special events to draw outside the lines
+		special = jQuery.event.special[ type ] || {};
+		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+			return;
+		}
+
+		// Determine event propagation path in advance, per W3C events spec (#9951)
+		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+			bubbleType = special.delegateType || type;
+			if ( !rfocusMorph.test( bubbleType + type ) ) {
+				cur = cur.parentNode;
+			}
+			for ( ; cur; cur = cur.parentNode ) {
+				eventPath.push( cur );
+				tmp = cur;
+			}
+
+			// Only add window if we got to document (e.g., not plain obj or detached DOM)
+			if ( tmp === (elem.ownerDocument || document) ) {
+				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+			}
+		}
+
+		// Fire handlers on the event path
+		i = 0;
+		while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+			event.type = i > 1 ?
+				bubbleType :
+				special.bindType || type;
+
+			// jQuery handler
+			handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+			if ( handle ) {
+				handle.apply( cur, data );
+			}
+
+			// Native handler
+			handle = ontype && cur[ ontype ];
+			if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+				event.preventDefault();
+			}
+		}
+		event.type = type;
+
+		// If nobody prevented the default action, do it now
+		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+			if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+				jQuery.acceptData( elem ) ) {
+
+				// Call a native DOM method on the target with the same name name as the event.
+				// Can't use an .isFunction() check here because IE6/7 fails that test.
+				// Don't do default actions on window, that's where global variables be (#6170)
+				if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
+
+					// Don't re-trigger an onFOO event when we call its FOO() method
+					tmp = elem[ ontype ];
+
+					if ( tmp ) {
+						elem[ ontype ] = null;
+					}
+
+					// Prevent re-triggering of the same event, since we already bubbled it above
+					jQuery.event.triggered = type;
+					try {
+						elem[ type ]();
+					} catch ( e ) {
+						// IE<9 dies on focus/blur to hidden element (#1486,#12518)
+						// only reproducible on winXP IE8 native, not IE9 in IE8 mode
+					}
+					jQuery.event.triggered = undefined;
+
+					if ( tmp ) {
+						elem[ ontype ] = tmp;
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	dispatch: function( event ) {
+
+		// Make a writable jQuery.Event from the native event object
+		event = jQuery.event.fix( event );
+
+		var i, ret, handleObj, matched, j,
+			handlerQueue = [],
+			args = core_slice.call( arguments ),
+			handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+			special = jQuery.event.special[ event.type ] || {};
+
+		// Use the fix-ed jQuery.Event rather than the (read-only) native event
+		args[0] = event;
+		event.delegateTarget = this;
+
+		// Call the preDispatch hook for the mapped type, and let it bail if desired
+		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+			return;
+		}
+
+		// Determine handlers
+		handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+		// Run delegates first; they may want to stop propagation beneath us
+		i = 0;
+		while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+			event.currentTarget = matched.elem;
+
+			j = 0;
+			while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+				// Triggered event must either 1) have no namespace, or
+				// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+				if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+					event.handleObj = handleObj;
+					event.data = handleObj.data;
+
+					ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+							.apply( matched.elem, args );
+
+					if ( ret !== undefined ) {
+						if ( (event.result = ret) === false ) {
+							event.preventDefault();
+							event.stopPropagation();
+						}
+					}
+				}
+			}
+		}
+
+		// Call the postDispatch hook for the mapped type
+		if ( special.postDispatch ) {
+			special.postDispatch.call( this, event );
+		}
+
+		return event.result;
+	},
+
+	handlers: function( event, handlers ) {
+		var sel, handleObj, matches, i,
+			handlerQueue = [],
+			delegateCount = handlers.delegateCount,
+			cur = event.target;
+
+		// Find delegate handlers
+		// Black-hole SVG <use> instance trees (#13180)
+		// Avoid non-left-click bubbling in Firefox (#3861)
+		if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+			/* jshint eqeqeq: false */
+			for ( ; cur != this; cur = cur.parentNode || this ) {
+				/* jshint eqeqeq: true */
+
+				// Don't check non-elements (#13208)
+				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+				if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
+					matches = [];
+					for ( i = 0; i < delegateCount; i++ ) {
+						handleObj = handlers[ i ];
+
+						// Don't conflict with Object.prototype properties (#13203)
+						sel = handleObj.selector + " ";
+
+						if ( matches[ sel ] === undefined ) {
+							matches[ sel ] = handleObj.needsContext ?
+								jQuery( sel, this ).index( cur ) >= 0 :
+								jQuery.find( sel, this, null, [ cur ] ).length;
+						}
+						if ( matches[ sel ] ) {
+							matches.push( handleObj );
+						}
+					}
+					if ( matches.length ) {
+						handlerQueue.push({ elem: cur, handlers: matches });
+					}
+				}
+			}
+		}
+
+		// Add the remaining (directly-bound) handlers
+		if ( delegateCount < handlers.length ) {
+			handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+		}
+
+		return handlerQueue;
+	},
+
+	fix: function( event ) {
+		if ( event[ jQuery.expando ] ) {
+			return event;
+		}
+
+		// Create a writable copy of the event object and normalize some properties
+		var i, prop, copy,
+			type = event.type,
+			originalEvent = event,
+			fixHook = this.fixHooks[ type ];
+
+		if ( !fixHook ) {
+			this.fixHooks[ type ] = fixHook =
+				rmouseEvent.test( type ) ? this.mouseHooks :
+				rkeyEvent.test( type ) ? this.keyHooks :
+				{};
+		}
+		copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+		event = new jQuery.Event( originalEvent );
+
+		i = copy.length;
+		while ( i-- ) {
+			prop = copy[ i ];
+			event[ prop ] = originalEvent[ prop ];
+		}
+
+		// Support: IE<9
+		// Fix target property (#1925)
+		if ( !event.target ) {
+			event.target = originalEvent.srcElement || document;
+		}
+
+		// Support: Chrome 23+, Safari?
+		// Target should not be a text node (#504, #13143)
+		if ( event.target.nodeType === 3 ) {
+			event.target = event.target.parentNode;
+		}
+
+		// Support: IE<9
+		// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+		event.metaKey = !!event.metaKey;
+
+		return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+	},
+
+	// Includes some event props shared by KeyEvent and MouseEvent
+	props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+	fixHooks: {},
+
+	keyHooks: {
+		props: "char charCode key keyCode".split(" "),
+		filter: function( event, original ) {
+
+			// Add which for key events
+			if ( event.which == null ) {
+				event.which = original.charCode != null ? original.charCode : original.keyCode;
+			}
+
+			return event;
+		}
+	},
+
+	mouseHooks: {
+		props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+		filter: function( event, original ) {
+			var body, eventDoc, doc,
+				button = original.button,
+				fromElement = original.fromElement;
+
+			// Calculate pageX/Y if missing and clientX/Y available
+			if ( event.pageX == null && original.clientX != null ) {
+				eventDoc = event.target.ownerDocument || document;
+				doc = eventDoc.documentElement;
+				body = eventDoc.body;
+
+				event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+				event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+			}
+
+			// Add relatedTarget, if necessary
+			if ( !event.relatedTarget && fromElement ) {
+				event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+			}
+
+			// Add which for click: 1 === left; 2 === middle; 3 === right
+			// Note: button is not normalized, so don't use it
+			if ( !event.which && button !== undefined ) {
+				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+			}
+
+			return event;
+		}
+	},
+
+	special: {
+		load: {
+			// Prevent triggered image.load events from bubbling to window.load
+			noBubble: true
+		},
+		focus: {
+			// Fire native event if possible so blur/focus sequence is correct
+			trigger: function() {
+				if ( this !== safeActiveElement() && this.focus ) {
+					try {
+						this.focus();
+						return false;
+					} catch ( e ) {
+						// Support: IE<9
+						// If we error on focus to hidden element (#1486, #12518),
+						// let .trigger() run the handlers
+					}
+				}
+			},
+			delegateType: "focusin"
+		},
+		blur: {
+			trigger: function() {
+				if ( this === safeActiveElement() && this.blur ) {
+					this.blur();
+					return false;
+				}
+			},
+			delegateType: "focusout"
+		},
+		click: {
+			// For checkbox, fire native event so checked state will be right
+			trigger: function() {
+				if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
+					this.click();
+					return false;
+				}
+			},
+
+			// For cross-browser consistency, don't fire native .click() on links
+			_default: function( event ) {
+				return jQuery.nodeName( event.target, "a" );
+			}
+		},
+
+		beforeunload: {
+			postDispatch: function( event ) {
+
+				// Even when returnValue equals to undefined Firefox will still show alert
+				if ( event.result !== undefined ) {
+					event.originalEvent.returnValue = event.result;
+				}
+			}
+		}
+	},
+
+	simulate: function( type, elem, event, bubble ) {
+		// Piggyback on a donor event to simulate a different one.
+		// Fake originalEvent to avoid donor's stopPropagation, but if the
+		// simulated event prevents default then we do the same on the donor.
+		var e = jQuery.extend(
+			new jQuery.Event(),
+			event,
+			{
+				type: type,
+				isSimulated: true,
+				originalEvent: {}
+			}
+		);
+		if ( bubble ) {
+			jQuery.event.trigger( e, null, elem );
+		} else {
+			jQuery.event.dispatch.call( elem, e );
+		}
+		if ( e.isDefaultPrevented() ) {
+			event.preventDefault();
+		}
+	}
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} :
+	function( elem, type, handle ) {
+		var name = "on" + type;
+
+		if ( elem.detachEvent ) {
+
+			// #8545, #7054, preventing memory leaks for custom events in IE6-8
+			// detachEvent needed property on element, by name of that event, to properly expose it to GC
+			if ( typeof elem[ name ] === core_strundefined ) {
+				elem[ name ] = null;
+			}
+
+			elem.detachEvent( name, handle );
+		}
+	};
+
+jQuery.Event = function( src, props ) {
+	// Allow instantiation without the 'new' keyword
+	if ( !(this instanceof jQuery.Event) ) {
+		return new jQuery.Event( src, props );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+
+		// Events bubbling up the document may have been marked as prevented
+		// by a handler lower down the tree; reflect the correct value.
+		this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+			src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// Put explicitly provided properties onto the event object
+	if ( props ) {
+		jQuery.extend( this, props );
+	}
+
+	// Create a timestamp if incoming event doesn't have one
+	this.timeStamp = src && src.timeStamp || jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+	isDefaultPrevented: returnFalse,
+	isPropagationStopped: returnFalse,
+	isImmediatePropagationStopped: returnFalse,
+
+	preventDefault: function() {
+		var e = this.originalEvent;
+
+		this.isDefaultPrevented = returnTrue;
+		if ( !e ) {
+			return;
+		}
+
+		// If preventDefault exists, run it on the original event
+		if ( e.preventDefault ) {
+			e.preventDefault();
+
+		// Support: IE
+		// Otherwise set the returnValue property of the original event to false
+		} else {
+			e.returnValue = false;
+		}
+	},
+	stopPropagation: function() {
+		var e = this.originalEvent;
+
+		this.isPropagationStopped = returnTrue;
+		if ( !e ) {
+			return;
+		}
+		// If stopPropagation exists, run it on the original event
+		if ( e.stopPropagation ) {
+			e.stopPropagation();
+		}
+
+		// Support: IE
+		// Set the cancelBubble property of the original event to true
+		e.cancelBubble = true;
+	},
+	stopImmediatePropagation: function() {
+		this.isImmediatePropagationStopped = returnTrue;
+		this.stopPropagation();
+	}
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+}, function( orig, fix ) {
+	jQuery.event.special[ orig ] = {
+		delegateType: fix,
+		bindType: fix,
+
+		handle: function( event ) {
+			var ret,
+				target = this,
+				related = event.relatedTarget,
+				handleObj = event.handleObj;
+
+			// For mousenter/leave call the handler if related is outside the target.
+			// NB: No relatedTarget if the mouse left/entered the browser window
+			if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+				event.type = handleObj.origType;
+				ret = handleObj.handler.apply( this, arguments );
+				event.type = fix;
+			}
+			return ret;
+		}
+	};
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+	jQuery.event.special.submit = {
+		setup: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Lazy-add a submit handler when a descendant form may potentially be submitted
+			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+				// Node name check avoids a VML-related crash in IE (#9807)
+				var elem = e.target,
+					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+				if ( form && !jQuery._data( form, "submitBubbles" ) ) {
+					jQuery.event.add( form, "submit._submit", function( event ) {
+						event._submit_bubble = true;
+					});
+					jQuery._data( form, "submitBubbles", true );
+				}
+			});
+			// return undefined since we don't need an event listener
+		},
+
+		postDispatch: function( event ) {
+			// If form was submitted by the user, bubble the event up the tree
+			if ( event._submit_bubble ) {
+				delete event._submit_bubble;
+				if ( this.parentNode && !event.isTrigger ) {
+					jQuery.event.simulate( "submit", this.parentNode, event, true );
+				}
+			}
+		},
+
+		teardown: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+			jQuery.event.remove( this, "._submit" );
+		}
+	};
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+	jQuery.event.special.change = {
+
+		setup: function() {
+
+			if ( rformElems.test( this.nodeName ) ) {
+				// IE doesn't fire change on a check/radio until blur; trigger it on click
+				// after a propertychange. Eat the blur-change in special.change.handle.
+				// This still fires onchange a second time for check/radio after blur.
+				if ( this.type === "checkbox" || this.type === "radio" ) {
+					jQuery.event.add( this, "propertychange._change", function( event ) {
+						if ( event.originalEvent.propertyName === "checked" ) {
+							this._just_changed = true;
+						}
+					});
+					jQuery.event.add( this, "click._change", function( event ) {
+						if ( this._just_changed && !event.isTrigger ) {
+							this._just_changed = false;
+						}
+						// Allow triggered, simulated change events (#11500)
+						jQuery.event.simulate( "change", this, event, true );
+					});
+				}
+				return false;
+			}
+			// Delegated event; lazy-add a change handler on descendant inputs
+			jQuery.event.add( this, "beforeactivate._change", function( e ) {
+				var elem = e.target;
+
+				if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
+					jQuery.event.add( elem, "change._change", function( event ) {
+						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+							jQuery.event.simulate( "change", this.parentNode, event, true );
+						}
+					});
+					jQuery._data( elem, "changeBubbles", true );
+				}
+			});
+		},
+
+		handle: function( event ) {
+			var elem = event.target;
+
+			// Swallow native change events from checkbox/radio, we already triggered them above
+			if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+				return event.handleObj.handler.apply( this, arguments );
+			}
+		},
+
+		teardown: function() {
+			jQuery.event.remove( this, "._change" );
+
+			return !rformElems.test( this.nodeName );
+		}
+	};
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+		// Attach a single capturing handler while someone wants focusin/focusout
+		var attaches = 0,
+			handler = function( event ) {
+				jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+			};
+
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				if ( attaches++ === 0 ) {
+					document.addEventListener( orig, handler, true );
+				}
+			},
+			teardown: function() {
+				if ( --attaches === 0 ) {
+					document.removeEventListener( orig, handler, true );
+				}
+			}
+		};
+	});
+}
+
+jQuery.fn.extend({
+
+	on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+		var type, origFn;
+
+		// Types can be a map of types/handlers
+		if ( typeof types === "object" ) {
+			// ( types-Object, selector, data )
+			if ( typeof selector !== "string" ) {
+				// ( types-Object, data )
+				data = data || selector;
+				selector = undefined;
+			}
+			for ( type in types ) {
+				this.on( type, selector, data, types[ type ], one );
+			}
+			return this;
+		}
+
+		if ( data == null && fn == null ) {
+			// ( types, fn )
+			fn = selector;
+			data = selector = undefined;
+		} else if ( fn == null ) {
+			if ( typeof selector === "string" ) {
+				// ( types, selector, fn )
+				fn = data;
+				data = undefined;
+			} else {
+				// ( types, data, fn )
+				fn = data;
+				data = selector;
+				selector = undefined;
+			}
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		} else if ( !fn ) {
+			return this;
+		}
+
+		if ( one === 1 ) {
+			origFn = fn;
+			fn = function( event ) {
+				// Can use an empty set, since event contains the info
+				jQuery().off( event );
+				return origFn.apply( this, arguments );
+			};
+			// Use same guid so caller can remove using origFn
+			fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+		}
+		return this.each( function() {
+			jQuery.event.add( this, types, fn, data, selector );
+		});
+	},
+	one: function( types, selector, data, fn ) {
+		return this.on( types, selector, data, fn, 1 );
+	},
+	off: function( types, selector, fn ) {
+		var handleObj, type;
+		if ( types && types.preventDefault && types.handleObj ) {
+			// ( event )  dispatched jQuery.Event
+			handleObj = types.handleObj;
+			jQuery( types.delegateTarget ).off(
+				handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+				handleObj.selector,
+				handleObj.handler
+			);
+			return this;
+		}
+		if ( typeof types === "object" ) {
+			// ( types-object [, selector] )
+			for ( type in types ) {
+				this.off( type, selector, types[ type ] );
+			}
+			return this;
+		}
+		if ( selector === false || typeof selector === "function" ) {
+			// ( types [, fn] )
+			fn = selector;
+			selector = undefined;
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		}
+		return this.each(function() {
+			jQuery.event.remove( this, types, fn, selector );
+		});
+	},
+
+	trigger: function( type, data ) {
+		return this.each(function() {
+			jQuery.event.trigger( type, data, this );
+		});
+	},
+	triggerHandler: function( type, data ) {
+		var elem = this[0];
+		if ( elem ) {
+			return jQuery.event.trigger( type, data, elem, true );
+		}
+	}
+});
+var isSimple = /^.[^:#\[\.,]*$/,
+	rparentsprev = /^(?:parents|prev(?:Until|All))/,
+	rneedsContext = jQuery.expr.match.needsContext,
+	// methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var i,
+			ret = [],
+			self = this,
+			len = self.length;
+
+		if ( typeof selector !== "string" ) {
+			return this.pushStack( jQuery( selector ).filter(function() {
+				for ( i = 0; i < len; i++ ) {
+					if ( jQuery.contains( self[ i ], this ) ) {
+						return true;
+					}
+				}
+			}) );
+		}
+
+		for ( i = 0; i < len; i++ ) {
+			jQuery.find( selector, self[ i ], ret );
+		}
+
+		// Needed because $( selector, context ) becomes $( context ).find( selector )
+		ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+		ret.selector = this.selector ? this.selector + " " + selector : selector;
+		return ret;
+	},
+
+	has: function( target ) {
+		var i,
+			targets = jQuery( target, this ),
+			len = targets.length;
+
+		return this.filter(function() {
+			for ( i = 0; i < len; i++ ) {
+				if ( jQuery.contains( this, targets[i] ) ) {
+					return true;
+				}
+			}
+		});
+	},
+
+	not: function( selector ) {
+		return this.pushStack( winnow(this, selector || [], true) );
+	},
+
+	filter: function( selector ) {
+		return this.pushStack( winnow(this, selector || [], false) );
+	},
+
+	is: function( selector ) {
+		return !!winnow(
+			this,
+
+			// If this is a positional/relative selector, check membership in the returned set
+			// so $("p:first").is("p:last") won't return true for a doc with two "p".
+			typeof selector === "string" && rneedsContext.test( selector ) ?
+				jQuery( selector ) :
+				selector || [],
+			false
+		).length;
+	},
+
+	closest: function( selectors, context ) {
+		var cur,
+			i = 0,
+			l = this.length,
+			ret = [],
+			pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+				jQuery( selectors, context || this.context ) :
+				0;
+
+		for ( ; i < l; i++ ) {
+			for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+				// Always skip document fragments
+				if ( cur.nodeType < 11 && (pos ?
+					pos.index(cur) > -1 :
+
+					// Don't pass non-elements to Sizzle
+					cur.nodeType === 1 &&
+						jQuery.find.matchesSelector(cur, selectors)) ) {
+
+					cur = ret.push( cur );
+					break;
+				}
+			}
+		}
+
+		return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+
+		// No argument, return index in parent
+		if ( !elem ) {
+			return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+		}
+
+		// index in selector
+		if ( typeof elem === "string" ) {
+			return jQuery.inArray( this[0], jQuery( elem ) );
+		}
+
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[0] : elem, this );
+	},
+
+	add: function( selector, context ) {
+		var set = typeof selector === "string" ?
+				jQuery( selector, context ) :
+				jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+			all = jQuery.merge( this.get(), set );
+
+		return this.pushStack( jQuery.unique(all) );
+	},
+
+	addBack: function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter(selector)
+		);
+	}
+});
+
+function sibling( cur, dir ) {
+	do {
+		cur = cur[ dir ];
+	} while ( cur && cur.nodeType !== 1 );
+
+	return cur;
+}
+
+jQuery.each({
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return jQuery.dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return sibling( elem, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return sibling( elem, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return jQuery.dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return jQuery.dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+	},
+	children: function( elem ) {
+		return jQuery.sibling( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return jQuery.nodeName( elem, "iframe" ) ?
+			elem.contentDocument || elem.contentWindow.document :
+			jQuery.merge( [], elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var ret = jQuery.map( this, fn, until );
+
+		if ( name.slice( -5 ) !== "Until" ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		if ( this.length > 1 ) {
+			// Remove duplicates
+			if ( !guaranteedUnique[ name ] ) {
+				ret = jQuery.unique( ret );
+			}
+
+			// Reverse order for parents* and prev-derivatives
+			if ( rparentsprev.test( name ) ) {
+				ret = ret.reverse();
+			}
+		}
+
+		return this.pushStack( ret );
+	};
+});
+
+jQuery.extend({
+	filter: function( expr, elems, not ) {
+		var elem = elems[ 0 ];
+
+		if ( not ) {
+			expr = ":not(" + expr + ")";
+		}
+
+		return elems.length === 1 && elem.nodeType === 1 ?
+			jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+			jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+				return elem.nodeType === 1;
+			}));
+	},
+
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+			if ( cur.nodeType === 1 ) {
+				matched.push( cur );
+			}
+			cur = cur[dir];
+		}
+		return matched;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType === 1 && n !== elem ) {
+				r.push( n );
+			}
+		}
+
+		return r;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep( elements, function( elem, i ) {
+			/* jshint -W018 */
+			return !!qualifier.call( elem, i, elem ) !== not;
+		});
+
+	}
+
+	if ( qualifier.nodeType ) {
+		return jQuery.grep( elements, function( elem ) {
+			return ( elem === qualifier ) !== not;
+		});
+
+	}
+
+	if ( typeof qualifier === "string" ) {
+		if ( isSimple.test( qualifier ) ) {
+			return jQuery.filter( qualifier, elements, not );
+		}
+
+		qualifier = jQuery.filter( qualifier, elements );
+	}
+
+	return jQuery.grep( elements, function( elem ) {
+		return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
+	});
+}
+function createSafeFragment( document ) {
+	var list = nodeNames.split( "|" ),
+		safeFrag = document.createDocumentFragment();
+
+	if ( safeFrag.createElement ) {
+		while ( list.length ) {
+			safeFrag.createElement(
+				list.pop()
+			);
+		}
+	}
+	return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+		"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+	rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+	rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnoInnerhtml = /<(?:script|style|link)/i,
+	manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
+	// checked="checked" or checked
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	rscriptType = /^$|\/(?:java|ecma)script/i,
+	rscriptTypeMasked = /^true\/(.*)/,
+	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+	// We have to close these tags to support XHTML (#13200)
+	wrapMap = {
+		option: [ 1, "<select multiple='multiple'>", "</select>" ],
+		legend: [ 1, "<fieldset>", "</fieldset>" ],
+		area: [ 1, "<map>", "</map>" ],
+		param: [ 1, "<object>", "</object>" ],
+		thead: [ 1, "<table>", "</table>" ],
+		tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+		col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+		td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+		// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+		// unless wrapped in a div with non-breaking characters in front of it.
+		_default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>"  ]
+	},
+	safeFragment = createSafeFragment( document ),
+	fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+jQuery.fn.extend({
+	text: function( value ) {
+		return jQuery.access( this, function( value ) {
+			return value === undefined ?
+				jQuery.text( this ) :
+				this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+		}, null, value, arguments.length );
+	},
+
+	append: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+				var target = manipulationTarget( this, elem );
+				target.appendChild( elem );
+			}
+		});
+	},
+
+	prepend: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+				var target = manipulationTarget( this, elem );
+				target.insertBefore( elem, target.firstChild );
+			}
+		});
+	},
+
+	before: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.parentNode ) {
+				this.parentNode.insertBefore( elem, this );
+			}
+		});
+	},
+
+	after: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.parentNode ) {
+				this.parentNode.insertBefore( elem, this.nextSibling );
+			}
+		});
+	},
+
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		var elem,
+			elems = selector ? jQuery.filter( selector, this ) : this,
+			i = 0;
+
+		for ( ; (elem = elems[i]) != null; i++ ) {
+
+			if ( !keepData && elem.nodeType === 1 ) {
+				jQuery.cleanData( getAll( elem ) );
+			}
+
+			if ( elem.parentNode ) {
+				if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+					setGlobalEval( getAll( elem, "script" ) );
+				}
+				elem.parentNode.removeChild( elem );
+			}
+		}
+
+		return this;
+	},
+
+	empty: function() {
+		var elem,
+			i = 0;
+
+		for ( ; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( getAll( elem, false ) );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+
+			// If this is a select, ensure that it displays empty (#12336)
+			// Support: IE<9
+			if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
+				elem.options.length = 0;
+			}
+		}
+
+		return this;
+	},
+
+	clone: function( dataAndEvents, deepDataAndEvents ) {
+		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+		return this.map( function () {
+			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+		});
+	},
+
+	html: function( value ) {
+		return jQuery.access( this, function( value ) {
+			var elem = this[0] || {},
+				i = 0,
+				l = this.length;
+
+			if ( value === undefined ) {
+				return elem.nodeType === 1 ?
+					elem.innerHTML.replace( rinlinejQuery, "" ) :
+					undefined;
+			}
+
+			// See if we can take a shortcut and just use innerHTML
+			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+				( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&
+				( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+				!wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+				value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+				try {
+					for (; i < l; i++ ) {
+						// Remove element nodes and prevent memory leaks
+						elem = this[i] || {};
+						if ( elem.nodeType === 1 ) {
+							jQuery.cleanData( getAll( elem, false ) );
+							elem.innerHTML = value;
+						}
+					}
+
+					elem = 0;
+
+				// If using innerHTML throws an exception, use the fallback method
+				} catch(e) {}
+			}
+
+			if ( elem ) {
+				this.empty().append( value );
+			}
+		}, null, value, arguments.length );
+	},
+
+	replaceWith: function() {
+		var
+			// Snapshot the DOM in case .domManip sweeps something relevant into its fragment
+			args = jQuery.map( this, function( elem ) {
+				return [ elem.nextSibling, elem.parentNode ];
+			}),
+			i = 0;
+
+		// Make the changes, replacing each context element with the new content
+		this.domManip( arguments, function( elem ) {
+			var next = args[ i++ ],
+				parent = args[ i++ ];
+
+			if ( parent ) {
+				// Don't use the snapshot next if it has moved (#13810)
+				if ( next && next.parentNode !== parent ) {
+					next = this.nextSibling;
+				}
+				jQuery( this ).remove();
+				parent.insertBefore( elem, next );
+			}
+		// Allow new content to include elements from the context set
+		}, true );
+
+		// Force removal if there was no new content (e.g., from empty arguments)
+		return i ? this : this.remove();
+	},
+
+	detach: function( selector ) {
+		return this.remove( selector, true );
+	},
+
+	domManip: function( args, callback, allowIntersection ) {
+
+		// Flatten any nested arrays
+		args = core_concat.apply( [], args );
+
+		var first, node, hasScripts,
+			scripts, doc, fragment,
+			i = 0,
+			l = this.length,
+			set = this,
+			iNoClone = l - 1,
+			value = args[0],
+			isFunction = jQuery.isFunction( value );
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
+			return this.each(function( index ) {
+				var self = set.eq( index );
+				if ( isFunction ) {
+					args[0] = value.call( this, index, self.html() );
+				}
+				self.domManip( args, callback, allowIntersection );
+			});
+		}
+
+		if ( l ) {
+			fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
+			first = fragment.firstChild;
+
+			if ( fragment.childNodes.length === 1 ) {
+				fragment = first;
+			}
+
+			if ( first ) {
+				scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+				hasScripts = scripts.length;
+
+				// Use the original fragment for the last item instead of the first because it can end up
+				// being emptied incorrectly in certain situations (#8070).
+				for ( ; i < l; i++ ) {
+					node = fragment;
+
+					if ( i !== iNoClone ) {
+						node = jQuery.clone( node, true, true );
+
+						// Keep references to cloned scripts for later restoration
+						if ( hasScripts ) {
+							jQuery.merge( scripts, getAll( node, "script" ) );
+						}
+					}
+
+					callback.call( this[i], node, i );
+				}
+
+				if ( hasScripts ) {
+					doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+					// Reenable scripts
+					jQuery.map( scripts, restoreScript );
+
+					// Evaluate executable scripts on first document insertion
+					for ( i = 0; i < hasScripts; i++ ) {
+						node = scripts[ i ];
+						if ( rscriptType.test( node.type || "" ) &&
+							!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+							if ( node.src ) {
+								// Hope ajax is available...
+								jQuery._evalUrl( node.src );
+							} else {
+								jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
+							}
+						}
+					}
+				}
+
+				// Fix #11809: Avoid leaking memory
+				fragment = first = null;
+			}
+		}
+
+		return this;
+	}
+});
+
+// Support: IE<8
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+	return jQuery.nodeName( elem, "table" ) &&
+		jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
+
+		elem.getElementsByTagName("tbody")[0] ||
+			elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+		elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+	elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
+	return elem;
+}
+function restoreScript( elem ) {
+	var match = rscriptTypeMasked.exec( elem.type );
+	if ( match ) {
+		elem.type = match[1];
+	} else {
+		elem.removeAttribute("type");
+	}
+	return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+	var elem,
+		i = 0;
+	for ( ; (elem = elems[i]) != null; i++ ) {
+		jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
+	}
+}
+
+function cloneCopyEvent( src, dest ) {
+
+	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+		return;
+	}
+
+	var type, i, l,
+		oldData = jQuery._data( src ),
+		curData = jQuery._data( dest, oldData ),
+		events = oldData.events;
+
+	if ( events ) {
+		delete curData.handle;
+		curData.events = {};
+
+		for ( type in events ) {
+			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+				jQuery.event.add( dest, type, events[ type ][ i ] );
+			}
+		}
+	}
+
+	// make the cloned public data object a copy from the original
+	if ( curData.data ) {
+		curData.data = jQuery.extend( {}, curData.data );
+	}
+}
+
+function fixCloneNodeIssues( src, dest ) {
+	var nodeName, e, data;
+
+	// We do not need to do anything for non-Elements
+	if ( dest.nodeType !== 1 ) {
+		return;
+	}
+
+	nodeName = dest.nodeName.toLowerCase();
+
+	// IE6-8 copies events bound via attachEvent when using cloneNode.
+	if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
+		data = jQuery._data( dest );
+
+		for ( e in data.events ) {
+			jQuery.removeEvent( dest, e, data.handle );
+		}
+
+		// Event data gets referenced instead of copied if the expando gets copied too
+		dest.removeAttribute( jQuery.expando );
+	}
+
+	// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
+	if ( nodeName === "script" && dest.text !== src.text ) {
+		disableScript( dest ).text = src.text;
+		restoreScript( dest );
+
+	// IE6-10 improperly clones children of object elements using classid.
+	// IE10 throws NoModificationAllowedError if parent is null, #12132.
+	} else if ( nodeName === "object" ) {
+		if ( dest.parentNode ) {
+			dest.outerHTML = src.outerHTML;
+		}
+
+		// This path appears unavoidable for IE9. When cloning an object
+		// element in IE9, the outerHTML strategy above is not sufficient.
+		// If the src has innerHTML and the destination does not,
+		// copy the src.innerHTML into the dest.innerHTML. #10324
+		if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
+			dest.innerHTML = src.innerHTML;
+		}
+
+	} else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
+		// IE6-8 fails to persist the checked state of a cloned checkbox
+		// or radio button. Worse, IE6-7 fail to give the cloned element
+		// a checked appearance if the defaultChecked value isn't also set
+
+		dest.defaultChecked = dest.checked = src.checked;
+
+		// IE6-7 get confused and end up setting the value of a cloned
+		// checkbox/radio button to an empty string instead of "on"
+		if ( dest.value !== src.value ) {
+			dest.value = src.value;
+		}
+
+	// IE6-8 fails to return the selected option to the default selected
+	// state when cloning options
+	} else if ( nodeName === "option" ) {
+		dest.defaultSelected = dest.selected = src.defaultSelected;
+
+	// IE6-8 fails to set the defaultValue to the correct value when
+	// cloning other types of input fields
+	} else if ( nodeName === "input" || nodeName === "textarea" ) {
+		dest.defaultValue = src.defaultValue;
+	}
+}
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function( name, original ) {
+	jQuery.fn[ name ] = function( selector ) {
+		var elems,
+			i = 0,
+			ret = [],
+			insert = jQuery( selector ),
+			last = insert.length - 1;
+
+		for ( ; i <= last; i++ ) {
+			elems = i === last ? this : this.clone(true);
+			jQuery( insert[i] )[ original ]( elems );
+
+			// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
+			core_push.apply( ret, elems.get() );
+		}
+
+		return this.pushStack( ret );
+	};
+});
+
+function getAll( context, tag ) {
+	var elems, elem,
+		i = 0,
+		found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
+			typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
+			undefined;
+
+	if ( !found ) {
+		for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
+			if ( !tag || jQuery.nodeName( elem, tag ) ) {
+				found.push( elem );
+			} else {
+				jQuery.merge( found, getAll( elem, tag ) );
+			}
+		}
+	}
+
+	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+		jQuery.merge( [ context ], found ) :
+		found;
+}
+
+// Used in buildFragment, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+	if ( manipulation_rcheckableType.test( elem.type ) ) {
+		elem.defaultChecked = elem.checked;
+	}
+}
+
+jQuery.extend({
+	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+		var destElements, node, clone, i, srcElements,
+			inPage = jQuery.contains( elem.ownerDocument, elem );
+
+		if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+			clone = elem.cloneNode( true );
+
+		// IE<=8 does not properly clone detached, unknown element nodes
+		} else {
+			fragmentDiv.innerHTML = elem.outerHTML;
+			fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+		}
+
+		if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+				(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+
+			// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+			destElements = getAll( clone );
+			srcElements = getAll( elem );
+
+			// Fix all IE cloning issues
+			for ( i = 0; (node = srcElements[i]) != null; ++i ) {
+				// Ensure that the destination node is not null; Fixes #9587
+				if ( destElements[i] ) {
+					fixCloneNodeIssues( node, destElements[i] );
+				}
+			}
+		}
+
+		// Copy the events from the original to the clone
+		if ( dataAndEvents ) {
+			if ( deepDataAndEvents ) {
+				srcElements = srcElements || getAll( elem );
+				destElements = destElements || getAll( clone );
+
+				for ( i = 0; (node = srcElements[i]) != null; i++ ) {
+					cloneCopyEvent( node, destElements[i] );
+				}
+			} else {
+				cloneCopyEvent( elem, clone );
+			}
+		}
+
+		// Preserve script evaluation history
+		destElements = getAll( clone, "script" );
+		if ( destElements.length > 0 ) {
+			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+		}
+
+		destElements = srcElements = node = null;
+
+		// Return the cloned set
+		return clone;
+	},
+
+	buildFragment: function( elems, context, scripts, selection ) {
+		var j, elem, contains,
+			tmp, tag, tbody, wrap,
+			l = elems.length,
+
+			// Ensure a safe fragment
+			safe = createSafeFragment( context ),
+
+			nodes = [],
+			i = 0;
+
+		for ( ; i < l; i++ ) {
+			elem = elems[ i ];
+
+			if ( elem || elem === 0 ) {
+
+				// Add nodes directly
+				if ( jQuery.type( elem ) === "object" ) {
+					jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+				// Convert non-html into a text node
+				} else if ( !rhtml.test( elem ) ) {
+					nodes.push( context.createTextNode( elem ) );
+
+				// Convert html into DOM nodes
+				} else {
+					tmp = tmp || safe.appendChild( context.createElement("div") );
+
+					// Deserialize a standard representation
+					tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+					wrap = wrapMap[ tag ] || wrapMap._default;
+
+					tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
+
+					// Descend through wrappers to the right content
+					j = wrap[0];
+					while ( j-- ) {
+						tmp = tmp.lastChild;
+					}
+
+					// Manually add leading whitespace removed by IE
+					if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+						nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
+					}
+
+					// Remove IE's autoinserted <tbody> from table fragments
+					if ( !jQuery.support.tbody ) {
+
+						// String was a <table>, *may* have spurious <tbody>
+						elem = tag === "table" && !rtbody.test( elem ) ?
+							tmp.firstChild :
+
+							// String was a bare <thead> or <tfoot>
+							wrap[1] === "<table>" && !rtbody.test( elem ) ?
+								tmp :
+								0;
+
+						j = elem && elem.childNodes.length;
+						while ( j-- ) {
+							if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
+								elem.removeChild( tbody );
+							}
+						}
+					}
+
+					jQuery.merge( nodes, tmp.childNodes );
+
+					// Fix #12392 for WebKit and IE > 9
+					tmp.textContent = "";
+
+					// Fix #12392 for oldIE
+					while ( tmp.firstChild ) {
+						tmp.removeChild( tmp.firstChild );
+					}
+
+					// Remember the top-level container for proper cleanup
+					tmp = safe.lastChild;
+				}
+			}
+		}
+
+		// Fix #11356: Clear elements from fragment
+		if ( tmp ) {
+			safe.removeChild( tmp );
+		}
+
+		// Reset defaultChecked for any radios and checkboxes
+		// about to be appended to the DOM in IE 6/7 (#8060)
+		if ( !jQuery.support.appendChecked ) {
+			jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+		}
+
+		i = 0;
+		while ( (elem = nodes[ i++ ]) ) {
+
+			// #4087 - If origin and destination elements are the same, and this is
+			// that element, do not do anything
+			if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+				continue;
+			}
+
+			contains = jQuery.contains( elem.ownerDocument, elem );
+
+			// Append to fragment
+			tmp = getAll( safe.appendChild( elem ), "script" );
+
+			// Preserve script evaluation history
+			if ( contains ) {
+				setGlobalEval( tmp );
+			}
+
+			// Capture executables
+			if ( scripts ) {
+				j = 0;
+				while ( (elem = tmp[ j++ ]) ) {
+					if ( rscriptType.test( elem.type || "" ) ) {
+						scripts.push( elem );
+					}
+				}
+			}
+		}
+
+		tmp = null;
+
+		return safe;
+	},
+
+	cleanData: function( elems, /* internal */ acceptData ) {
+		var elem, type, id, data,
+			i = 0,
+			internalKey = jQuery.expando,
+			cache = jQuery.cache,
+			deleteExpando = jQuery.support.deleteExpando,
+			special = jQuery.event.special;
+
+		for ( ; (elem = elems[i]) != null; i++ ) {
+
+			if ( acceptData || jQuery.acceptData( elem ) ) {
+
+				id = elem[ internalKey ];
+				data = id && cache[ id ];
+
+				if ( data ) {
+					if ( data.events ) {
+						for ( type in data.events ) {
+							if ( special[ type ] ) {
+								jQuery.event.remove( elem, type );
+
+							// This is a shortcut to avoid jQuery.event.remove's overhead
+							} else {
+								jQuery.removeEvent( elem, type, data.handle );
+							}
+						}
+					}
+
+					// Remove cache only if it was not already removed by jQuery.event.remove
+					if ( cache[ id ] ) {
+
+						delete cache[ id ];
+
+						// IE does not allow us to delete expando properties from nodes,
+						// nor does it have a removeAttribute function on Document nodes;
+						// we must handle all of these cases
+						if ( deleteExpando ) {
+							delete elem[ internalKey ];
+
+						} else if ( typeof elem.removeAttribute !== core_strundefined ) {
+							elem.removeAttribute( internalKey );
+
+						} else {
+							elem[ internalKey ] = null;
+						}
+
+						core_deletedIds.push( id );
+					}
+				}
+			}
+		}
+	},
+
+	_evalUrl: function( url ) {
+		return jQuery.ajax({
+			url: url,
+			type: "GET",
+			dataType: "script",
+			async: false,
+			global: false,
+			"throws": true
+		});
+	}
+});
+jQuery.fn.extend({
+	wrapAll: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapAll( html.call(this, i) );
+			});
+		}
+
+		if ( this[0] ) {
+			// The elements to wrap the target around
+			var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+			if ( this[0].parentNode ) {
+				wrap.insertBefore( this[0] );
+			}
+
+			wrap.map(function() {
+				var elem = this;
+
+				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+					elem = elem.firstChild;
+				}
+
+				return elem;
+			}).append( this );
+		}
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		return this.each(function() {
+			var self = jQuery( this ),
+				contents = self.contents();
+
+			if ( contents.length ) {
+				contents.wrapAll( html );
+
+			} else {
+				self.append( html );
+			}
+		});
+	},
+
+	wrap: function( html ) {
+		var isFunction = jQuery.isFunction( html );
+
+		return this.each(function(i) {
+			jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+		});
+	},
+
+	unwrap: function() {
+		return this.parent().each(function() {
+			if ( !jQuery.nodeName( this, "body" ) ) {
+				jQuery( this ).replaceWith( this.childNodes );
+			}
+		}).end();
+	}
+});
+var iframe, getStyles, curCSS,
+	ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity\s*=\s*([^)]*)/,
+	rposition = /^(top|right|bottom|left)$/,
+	// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+	// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+	rmargin = /^margin/,
+	rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+	rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+	rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
+	elemdisplay = { BODY: "block" },
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+	cssNormalTransform = {
+		letterSpacing: 0,
+		fontWeight: 400
+	},
+
+	cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+	// shortcut for names that are not vendor prefixed
+	if ( name in style ) {
+		return name;
+	}
+
+	// check for vendor prefixed names
+	var capName = name.charAt(0).toUpperCase() + name.slice(1),
+		origName = name,
+		i = cssPrefixes.length;
+
+	while ( i-- ) {
+		name = cssPrefixes[ i ] + capName;
+		if ( name in style ) {
+			return name;
+		}
+	}
+
+	return origName;
+}
+
+function isHidden( elem, el ) {
+	// isHidden might be called from jQuery#filter function;
+	// in that case, element will be second argument
+	elem = el || elem;
+	return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+	var display, elem, hidden,
+		values = [],
+		index = 0,
+		length = elements.length;
+
+	for ( ; index < length; index++ ) {
+		elem = elements[ index ];
+		if ( !elem.style ) {
+			continue;
+		}
+
+		values[ index ] = jQuery._data( elem, "olddisplay" );
+		display = elem.style.display;
+		if ( show ) {
+			// Reset the inline display of this element to learn if it is
+			// being hidden by cascaded rules or not
+			if ( !values[ index ] && display === "none" ) {
+				elem.style.display = "";
+			}
+
+			// Set elements which have been overridden with display: none
+			// in a stylesheet to whatever the default browser style is
+			// for such an element
+			if ( elem.style.display === "" && isHidden( elem ) ) {
+				values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+			}
+		} else {
+
+			if ( !values[ index ] ) {
+				hidden = isHidden( elem );
+
+				if ( display && display !== "none" || !hidden ) {
+					jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+				}
+			}
+		}
+	}
+
+	// Set the display of most of the elements in a second loop
+	// to avoid the constant reflow
+	for ( index = 0; index < length; index++ ) {
+		elem = elements[ index ];
+		if ( !elem.style ) {
+			continue;
+		}
+		if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+			elem.style.display = show ? values[ index ] || "" : "none";
+		}
+	}
+
+	return elements;
+}
+
+jQuery.fn.extend({
+	css: function( name, value ) {
+		return jQuery.access( this, function( elem, name, value ) {
+			var len, styles,
+				map = {},
+				i = 0;
+
+			if ( jQuery.isArray( name ) ) {
+				styles = getStyles( elem );
+				len = name.length;
+
+				for ( ; i < len; i++ ) {
+					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+				}
+
+				return map;
+			}
+
+			return value !== undefined ?
+				jQuery.style( elem, name, value ) :
+				jQuery.css( elem, name );
+		}, name, value, arguments.length > 1 );
+	},
+	show: function() {
+		return showHide( this, true );
+	},
+	hide: function() {
+		return showHide( this );
+	},
+	toggle: function( state ) {
+		if ( typeof state === "boolean" ) {
+			return state ? this.show() : this.hide();
+		}
+
+		return this.each(function() {
+			if ( isHidden( this ) ) {
+				jQuery( this ).show();
+			} else {
+				jQuery( this ).hide();
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity" );
+					return ret === "" ? "1" : ret;
+				}
+			}
+		}
+	},
+
+	// Don't automatically add "px" to these possibly-unitless properties
+	cssNumber: {
+		"columnCount": true,
+		"fillOpacity": true,
+		"fontWeight": true,
+		"lineHeight": true,
+		"opacity": true,
+		"order": true,
+		"orphans": true,
+		"widows": true,
+		"zIndex": true,
+		"zoom": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, type, hooks,
+			origName = jQuery.camelCase( name ),
+			style = elem.style;
+
+		name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+		// gets hook for the prefixed version
+		// followed by the unprefixed version
+		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			type = typeof value;
+
+			// convert relative number strings (+= or -=) to relative numbers. #7345
+			if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+				value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+				// Fixes bug #9237
+				type = "number";
+			}
+
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( value == null || type === "number" && isNaN( value ) ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
+			// but it would mean to define eight (for every problematic property) identical functions
+			if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+				style[ name ] = "inherit";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra, styles ) {
+		var num, val, hooks,
+			origName = jQuery.camelCase( name );
+
+		// Make sure that we're working with the right name
+		name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+		// gets hook for the prefixed version
+		// followed by the unprefixed version
+		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks ) {
+			val = hooks.get( elem, true, extra );
+		}
+
+		// Otherwise, if a way to get the computed value exists, use that
+		if ( val === undefined ) {
+			val = curCSS( elem, name, styles );
+		}
+
+		//convert "normal" to computed value
+		if ( val === "normal" && name in cssNormalTransform ) {
+			val = cssNormalTransform[ name ];
+		}
+
+		// Return, converting to number if forced or a qualifier was provided and val looks numeric
+		if ( extra === "" || extra ) {
+			num = parseFloat( val );
+			return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+		}
+		return val;
+	}
+});
+
+// NOTE: we've included the "window" in window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+	getStyles = function( elem ) {
+		return window.getComputedStyle( elem, null );
+	};
+
+	curCSS = function( elem, name, _computed ) {
+		var width, minWidth, maxWidth,
+			computed = _computed || getStyles( elem ),
+
+			// getPropertyValue is only needed for .css('filter') in IE9, see #12537
+			ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
+			style = elem.style;
+
+		if ( computed ) {
+
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+
+			// A tribute to the "awesome hack by Dean Edwards"
+			// Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+			// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+			// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+			if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+				// Remember the original values
+				width = style.width;
+				minWidth = style.minWidth;
+				maxWidth = style.maxWidth;
+
+				// Put in the new values to get a computed value out
+				style.minWidth = style.maxWidth = style.width = ret;
+				ret = computed.width;
+
+				// Revert the changed values
+				style.width = width;
+				style.minWidth = minWidth;
+				style.maxWidth = maxWidth;
+			}
+		}
+
+		return ret;
+	};
+} else if ( document.documentElement.currentStyle ) {
+	getStyles = function( elem ) {
+		return elem.currentStyle;
+	};
+
+	curCSS = function( elem, name, _computed ) {
+		var left, rs, rsLeft,
+			computed = _computed || getStyles( elem ),
+			ret = computed ? computed[ name ] : undefined,
+			style = elem.style;
+
+		// Avoid setting ret to empty string here
+		// so we don't default to auto
+		if ( ret == null && style && style[ name ] ) {
+			ret = style[ name ];
+		}
+
+		// From the awesome hack by Dean Edwards
+		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+		// If we're not dealing with a regular pixel number
+		// but a number that has a weird ending, we need to convert it to pixels
+		// but not position css attributes, as those are proportional to the parent element instead
+		// and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+		if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+			// Remember the original values
+			left = style.left;
+			rs = elem.runtimeStyle;
+			rsLeft = rs && rs.left;
+
+			// Put in the new values to get a computed value out
+			if ( rsLeft ) {
+				rs.left = elem.currentStyle.left;
+			}
+			style.left = name === "fontSize" ? "1em" : ret;
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			if ( rsLeft ) {
+				rs.left = rsLeft;
+			}
+		}
+
+		return ret === "" ? "auto" : ret;
+	};
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+	var matches = rnumsplit.exec( value );
+	return matches ?
+		// Guard against undefined "subtract", e.g., when used as in cssHooks
+		Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+		value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+	var i = extra === ( isBorderBox ? "border" : "content" ) ?
+		// If we already have the right measurement, avoid augmentation
+		4 :
+		// Otherwise initialize for horizontal or vertical properties
+		name === "width" ? 1 : 0,
+
+		val = 0;
+
+	for ( ; i < 4; i += 2 ) {
+		// both box models exclude margin, so add it if we want it
+		if ( extra === "margin" ) {
+			val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+		}
+
+		if ( isBorderBox ) {
+			// border-box includes padding, so remove it if we want content
+			if ( extra === "content" ) {
+				val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+			}
+
+			// at this point, extra isn't border nor margin, so remove border
+			if ( extra !== "margin" ) {
+				val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+			}
+		} else {
+			// at this point, extra isn't content, so add padding
+			val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+			// at this point, extra isn't content nor padding, so add border
+			if ( extra !== "padding" ) {
+				val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+			}
+		}
+	}
+
+	return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+	// Start with offset property, which is equivalent to the border-box value
+	var valueIsBorderBox = true,
+		val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+		styles = getStyles( elem ),
+		isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+	// some non-html elements return undefined for offsetWidth, so check for null/undefined
+	// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+	// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+	if ( val <= 0 || val == null ) {
+		// Fall back to computed then uncomputed css if necessary
+		val = curCSS( elem, name, styles );
+		if ( val < 0 || val == null ) {
+			val = elem.style[ name ];
+		}
+
+		// Computed unit is not pixels. Stop here and return.
+		if ( rnumnonpx.test(val) ) {
+			return val;
+		}
+
+		// we need the check for style in case a browser which returns unreliable values
+		// for getComputedStyle silently falls back to the reliable elem.style
+		valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+		// Normalize "", auto, and prepare for extra
+		val = parseFloat( val ) || 0;
+	}
+
+	// use the active box-sizing model to add/subtract irrelevant styles
+	return ( val +
+		augmentWidthOrHeight(
+			elem,
+			name,
+			extra || ( isBorderBox ? "border" : "content" ),
+			valueIsBorderBox,
+			styles
+		)
+	) + "px";
+}
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+	var doc = document,
+		display = elemdisplay[ nodeName ];
+
+	if ( !display ) {
+		display = actualDisplay( nodeName, doc );
+
+		// If the simple way fails, read from inside an iframe
+		if ( display === "none" || !display ) {
+			// Use the already-created iframe if possible
+			iframe = ( iframe ||
+				jQuery("<iframe frameborder='0' width='0' height='0'/>")
+				.css( "cssText", "display:block !important" )
+			).appendTo( doc.documentElement );
+
+			// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+			doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
+			doc.write("<!doctype html><html><body>");
+			doc.close();
+
+			display = actualDisplay( nodeName, doc );
+			iframe.detach();
+		}
+
+		// Store the correct default display
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return display;
+}
+
+// Called ONLY from within css_defaultDisplay
+function actualDisplay( name, doc ) {
+	var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+		display = jQuery.css( elem[0], "display" );
+	elem.remove();
+	return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			if ( computed ) {
+				// certain elements can have dimension info if we invisibly show them
+				// however, it must have a current display style that would benefit from this
+				return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
+					jQuery.swap( elem, cssShow, function() {
+						return getWidthOrHeight( elem, name, extra );
+					}) :
+					getWidthOrHeight( elem, name, extra );
+			}
+		},
+
+		set: function( elem, value, extra ) {
+			var styles = extra && getStyles( elem );
+			return setPositiveNumber( elem, value, extra ?
+				augmentWidthOrHeight(
+					elem,
+					name,
+					extra,
+					jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+					styles
+				) : 0
+			);
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+				( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style,
+				currentStyle = elem.currentStyle,
+				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+				filter = currentStyle && currentStyle.filter || style.filter || "";
+
+			// IE has trouble with opacity if it does not have layout
+			// Force it by setting the zoom level
+			style.zoom = 1;
+
+			// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+			// if value === "", then remove inline opacity #12685
+			if ( ( value >= 1 || value === "" ) &&
+					jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+					style.removeAttribute ) {
+
+				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+				// if "filter:" is present at all, clearType is disabled, we want to avoid this
+				// style.removeAttribute is IE Only, but so apparently is this code path...
+				style.removeAttribute( "filter" );
+
+				// if there is no filter style applied in a css rule or unset inline opacity, we are done
+				if ( value === "" || currentStyle && !currentStyle.filter ) {
+					return;
+				}
+			}
+
+			// otherwise, set new filter values
+			style.filter = ralpha.test( filter ) ?
+				filter.replace( ralpha, opacity ) :
+				filter + " " + opacity;
+		}
+	};
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+	if ( !jQuery.support.reliableMarginRight ) {
+		jQuery.cssHooks.marginRight = {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+					// Work around by temporarily setting element display to inline-block
+					return jQuery.swap( elem, { "display": "inline-block" },
+						curCSS, [ elem, "marginRight" ] );
+				}
+			}
+		};
+	}
+
+	// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+	// getComputedStyle returns percent when specified for top/left/bottom/right
+	// rather than make the css module depend on the offset module, we just check for it here
+	if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+		jQuery.each( [ "top", "left" ], function( i, prop ) {
+			jQuery.cssHooks[ prop ] = {
+				get: function( elem, computed ) {
+					if ( computed ) {
+						computed = curCSS( elem, prop );
+						// if curCSS returns percentage, fallback to offset
+						return rnumnonpx.test( computed ) ?
+							jQuery( elem ).position()[ prop ] + "px" :
+							computed;
+					}
+				}
+			};
+		});
+	}
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		// Support: Opera <= 12.12
+		// Opera reports offsetWidths and offsetHeights less than zero on some elements
+		return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
+			(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+	margin: "",
+	padding: "",
+	border: "Width"
+}, function( prefix, suffix ) {
+	jQuery.cssHooks[ prefix + suffix ] = {
+		expand: function( value ) {
+			var i = 0,
+				expanded = {},
+
+				// assumes a single number if not a string
+				parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+			for ( ; i < 4; i++ ) {
+				expanded[ prefix + cssExpand[ i ] + suffix ] =
+					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+			}
+
+			return expanded;
+		}
+	};
+
+	if ( !rmargin.test( prefix ) ) {
+		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+	}
+});
+var r20 = /%20/g,
+	rbracket = /\[\]$/,
+	rCRLF = /\r?\n/g,
+	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+	rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+jQuery.fn.extend({
+	serialize: function() {
+		return jQuery.param( this.serializeArray() );
+	},
+	serializeArray: function() {
+		return this.map(function(){
+			// Can add propHook for "elements" to filter or add form elements
+			var elements = jQuery.prop( this, "elements" );
+			return elements ? jQuery.makeArray( elements ) : this;
+		})
+		.filter(function(){
+			var type = this.type;
+			// Use .is(":disabled") so that fieldset[disabled] works
+			return this.name && !jQuery( this ).is( ":disabled" ) &&
+				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+				( this.checked || !manipulation_rcheckableType.test( type ) );
+		})
+		.map(function( i, elem ){
+			var val = jQuery( this ).val();
+
+			return val == null ?
+				null :
+				jQuery.isArray( val ) ?
+					jQuery.map( val, function( val ){
+						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+					}) :
+					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+		}).get();
+	}
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+	var prefix,
+		s = [],
+		add = function( key, value ) {
+			// If value is a function, invoke it and return its value
+			value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+			s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+		};
+
+	// Set traditional to true for jQuery <= 1.3.2 behavior.
+	if ( traditional === undefined ) {
+		traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+	}
+
+	// If an array was passed in, assume that it is an array of form elements.
+	if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+		// Serialize the form elements
+		jQuery.each( a, function() {
+			add( this.name, this.value );
+		});
+
+	} else {
+		// If traditional, encode the "old" way (the way 1.3.2 or older
+		// did it), otherwise encode params recursively.
+		for ( prefix in a ) {
+			buildParams( prefix, a[ prefix ], traditional, add );
+		}
+	}
+
+	// Return the resulting serialization
+	return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+	var name;
+
+	if ( jQuery.isArray( obj ) ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// Treat each array item as a scalar.
+				add( prefix, v );
+
+			} else {
+				// Item is non-scalar (array or object), encode its numeric index.
+				buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+			}
+		});
+
+	} else if ( !traditional && jQuery.type( obj ) === "object" ) {
+		// Serialize object item.
+		for ( name in obj ) {
+			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+		}
+
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+	"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+	// Handle event binding
+	jQuery.fn[ name ] = function( data, fn ) {
+		return arguments.length > 0 ?
+			this.on( name, null, data, fn ) :
+			this.trigger( name );
+	};
+});
+
+jQuery.fn.extend({
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	},
+
+	bind: function( types, data, fn ) {
+		return this.on( types, null, data, fn );
+	},
+	unbind: function( types, fn ) {
+		return this.off( types, null, fn );
+	},
+
+	delegate: function( selector, types, data, fn ) {
+		return this.on( types, selector, data, fn );
+	},
+	undelegate: function( selector, types, fn ) {
+		// ( namespace ) or ( selector, types [, fn] )
+		return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+	}
+});
+var
+	// Document location
+	ajaxLocParts,
+	ajaxLocation,
+	ajax_nonce = jQuery.now(),
+
+	ajax_rquery = /\?/,
+	rhash = /#.*$/,
+	rts = /([?&])_=[^&]*/,
+	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+	// #7653, #8125, #8152: local protocol detection
+	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rprotocol = /^\/\//,
+	rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load,
+
+	/* Prefilters
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+	 * 2) These are called:
+	 *    - BEFORE asking for a transport
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
+	 * 3) key is the dataType
+	 * 4) the catchall symbol "*" can be used
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+	 */
+	prefilters = {},
+
+	/* Transports bindings
+	 * 1) key is the dataType
+	 * 2) the catchall symbol "*" can be used
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
+	 */
+	transports = {},
+
+	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+	allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+	ajaxLocation = location.href;
+} catch( e ) {
+	// Use the href attribute of an A element
+	// since IE will modify it given document.location
+	ajaxLocation = document.createElement( "a" );
+	ajaxLocation.href = "";
+	ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+	// dataTypeExpression is optional and defaults to "*"
+	return function( dataTypeExpression, func ) {
+
+		if ( typeof dataTypeExpression !== "string" ) {
+			func = dataTypeExpression;
+			dataTypeExpression = "*";
+		}
+
+		var dataType,
+			i = 0,
+			dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
+
+		if ( jQuery.isFunction( func ) ) {
+			// For each dataType in the dataTypeExpression
+			while ( (dataType = dataTypes[i++]) ) {
+				// Prepend if requested
+				if ( dataType[0] === "+" ) {
+					dataType = dataType.slice( 1 ) || "*";
+					(structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+				// Otherwise append
+				} else {
+					(structure[ dataType ] = structure[ dataType ] || []).push( func );
+				}
+			}
+		}
+	};
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+	var inspected = {},
+		seekingTransport = ( structure === transports );
+
+	function inspect( dataType ) {
+		var selected;
+		inspected[ dataType ] = true;
+		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+			if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+				options.dataTypes.unshift( dataTypeOrTransport );
+				inspect( dataTypeOrTransport );
+				return false;
+			} else if ( seekingTransport ) {
+				return !( selected = dataTypeOrTransport );
+			}
+		});
+		return selected;
+	}
+
+	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+	var deep, key,
+		flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+	for ( key in src ) {
+		if ( src[ key ] !== undefined ) {
+			( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+		}
+	}
+	if ( deep ) {
+		jQuery.extend( true, target, deep );
+	}
+
+	return target;
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+	if ( typeof url !== "string" && _load ) {
+		return _load.apply( this, arguments );
+	}
+
+	var selector, response, type,
+		self = this,
+		off = url.indexOf(" ");
+
+	if ( off >= 0 ) {
+		selector = url.slice( off, url.length );
+		url = url.slice( 0, off );
+	}
+
+	// If it's a function
+	if ( jQuery.isFunction( params ) ) {
+
+		// We assume that it's the callback
+		callback = params;
+		params = undefined;
+
+	// Otherwise, build a param string
+	} else if ( params && typeof params === "object" ) {
+		type = "POST";
+	}
+
+	// If we have elements to modify, make the request
+	if ( self.length > 0 ) {
+		jQuery.ajax({
+			url: url,
+
+			// if "type" variable is undefined, then "GET" method will be used
+			type: type,
+			dataType: "html",
+			data: params
+		}).done(function( responseText ) {
+
+			// Save response for use in complete callback
+			response = arguments;
+
+			self.html( selector ?
+
+				// If a selector was specified, locate the right elements in a dummy div
+				// Exclude scripts to avoid IE 'Permission Denied' errors
+				jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+				// Otherwise use the full result
+				responseText );
+
+		}).complete( callback && function( jqXHR, status ) {
+			self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+		});
+	}
+
+	return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
+	jQuery.fn[ type ] = function( fn ){
+		return this.on( type, fn );
+	};
+});
+
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {},
+
+	ajaxSettings: {
+		url: ajaxLocation,
+		type: "GET",
+		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+		global: true,
+		processData: true,
+		async: true,
+		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+		/*
+		timeout: 0,
+		data: null,
+		dataType: null,
+		username: null,
+		password: null,
+		cache: null,
+		throws: false,
+		traditional: false,
+		headers: {},
+		*/
+
+		accepts: {
+			"*": allTypes,
+			text: "text/plain",
+			html: "text/html",
+			xml: "application/xml, text/xml",
+			json: "application/json, text/javascript"
+		},
+
+		contents: {
+			xml: /xml/,
+			html: /html/,
+			json: /json/
+		},
+
+		responseFields: {
+			xml: "responseXML",
+			text: "responseText",
+			json: "responseJSON"
+		},
+
+		// Data converters
+		// Keys separate source (or catchall "*") and destination types with a single space
+		converters: {
+
+			// Convert anything to text
+			"* text": String,
+
+			// Text to html (true = no transformation)
+			"text html": true,
+
+			// Evaluate text as a json expression
+			"text json": jQuery.parseJSON,
+
+			// Parse text as xml
+			"text xml": jQuery.parseXML
+		},
+
+		// For options that shouldn't be deep extended:
+		// you can add your own custom options here if
+		// and when you create one that shouldn't be
+		// deep extended (see ajaxExtend)
+		flatOptions: {
+			url: true,
+			context: true
+		}
+	},
+
+	// Creates a full fledged settings object into target
+	// with both ajaxSettings and settings fields.
+	// If target is omitted, writes into ajaxSettings.
+	ajaxSetup: function( target, settings ) {
+		return settings ?
+
+			// Building a settings object
+			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+			// Extending ajaxSettings
+			ajaxExtend( jQuery.ajaxSettings, target );
+	},
+
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+	// Main method
+	ajax: function( url, options ) {
+
+		// If url is an object, simulate pre-1.5 signature
+		if ( typeof url === "object" ) {
+			options = url;
+			url = undefined;
+		}
+
+		// Force options to be an object
+		options = options || {};
+
+		var // Cross-domain detection vars
+			parts,
+			// Loop variable
+			i,
+			// URL without anti-cache param
+			cacheURL,
+			// Response headers as string
+			responseHeadersString,
+			// timeout handle
+			timeoutTimer,
+
+			// To know if global events are to be dispatched
+			fireGlobals,
+
+			transport,
+			// Response headers
+			responseHeaders,
+			// Create the final options object
+			s = jQuery.ajaxSetup( {}, options ),
+			// Callbacks context
+			callbackContext = s.context || s,
+			// Context for global events is callbackContext if it is a DOM node or jQuery collection
+			globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+				jQuery( callbackContext ) :
+				jQuery.event,
+			// Deferreds
+			deferred = jQuery.Deferred(),
+			completeDeferred = jQuery.Callbacks("once memory"),
+			// Status-dependent callbacks
+			statusCode = s.statusCode || {},
+			// Headers (they are sent all at once)
+			requestHeaders = {},
+			requestHeadersNames = {},
+			// The jqXHR state
+			state = 0,
+			// Default abort message
+			strAbort = "canceled",
+			// Fake xhr
+			jqXHR = {
+				readyState: 0,
+
+				// Builds headers hashtable if needed
+				getResponseHeader: function( key ) {
+					var match;
+					if ( state === 2 ) {
+						if ( !responseHeaders ) {
+							responseHeaders = {};
+							while ( (match = rheaders.exec( responseHeadersString )) ) {
+								responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+							}
+						}
+						match = responseHeaders[ key.toLowerCase() ];
+					}
+					return match == null ? null : match;
+				},
+
+				// Raw string
+				getAllResponseHeaders: function() {
+					return state === 2 ? responseHeadersString : null;
+				},
+
+				// Caches the header
+				setRequestHeader: function( name, value ) {
+					var lname = name.toLowerCase();
+					if ( !state ) {
+						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+						requestHeaders[ name ] = value;
+					}
+					return this;
+				},
+
+				// Overrides response content-type header
+				overrideMimeType: function( type ) {
+					if ( !state ) {
+						s.mimeType = type;
+					}
+					return this;
+				},
+
+				// Status-dependent callbacks
+				statusCode: function( map ) {
+					var code;
+					if ( map ) {
+						if ( state < 2 ) {
+							for ( code in map ) {
+								// Lazy-add the new callback in a way that preserves old ones
+								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+							}
+						} else {
+							// Execute the appropriate callbacks
+							jqXHR.always( map[ jqXHR.status ] );
+						}
+					}
+					return this;
+				},
+
+				// Cancel the request
+				abort: function( statusText ) {
+					var finalText = statusText || strAbort;
+					if ( transport ) {
+						transport.abort( finalText );
+					}
+					done( 0, finalText );
+					return this;
+				}
+			};
+
+		// Attach deferreds
+		deferred.promise( jqXHR ).complete = completeDeferred.add;
+		jqXHR.success = jqXHR.done;
+		jqXHR.error = jqXHR.fail;
+
+		// Remove hash character (#7531: and string promotion)
+		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+		// Handle falsy url in the settings object (#10093: consistency with old signature)
+		// We also use the url parameter if available
+		s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+		// Alias method option to type as per ticket #12004
+		s.type = options.method || options.type || s.method || s.type;
+
+		// Extract dataTypes list
+		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
+
+		// A cross-domain request is in order when we have a protocol:host:port mismatch
+		if ( s.crossDomain == null ) {
+			parts = rurl.exec( s.url.toLowerCase() );
+			s.crossDomain = !!( parts &&
+				( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+			);
+		}
+
+		// Convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Apply prefilters
+		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+		// If request was aborted inside a prefilter, stop there
+		if ( state === 2 ) {
+			return jqXHR;
+		}
+
+		// We can fire global events as of now if asked to
+		fireGlobals = s.global;
+
+		// Watch for a new set of requests
+		if ( fireGlobals && jQuery.active++ === 0 ) {
+			jQuery.event.trigger("ajaxStart");
+		}
+
+		// Uppercase the type
+		s.type = s.type.toUpperCase();
+
+		// Determine if request has content
+		s.hasContent = !rnoContent.test( s.type );
+
+		// Save the URL in case we're toying with the If-Modified-Since
+		// and/or If-None-Match header later on
+		cacheURL = s.url;
+
+		// More options handling for requests with no content
+		if ( !s.hasContent ) {
+
+			// If data is available, append data to url
+			if ( s.data ) {
+				cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+				// #9682: remove data so that it's not used in an eventual retry
+				delete s.data;
+			}
+
+			// Add anti-cache in url if needed
+			if ( s.cache === false ) {
+				s.url = rts.test( cacheURL ) ?
+
+					// If there is already a '_' parameter, set its value
+					cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
+
+					// Otherwise add one to the end
+					cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
+			}
+		}
+
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+		if ( s.ifModified ) {
+			if ( jQuery.lastModified[ cacheURL ] ) {
+				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+			}
+			if ( jQuery.etag[ cacheURL ] ) {
+				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+			}
+		}
+
+		// Set the correct header, if data is being sent
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+			jqXHR.setRequestHeader( "Content-Type", s.contentType );
+		}
+
+		// Set the Accepts header for the server, depending on the dataType
+		jqXHR.setRequestHeader(
+			"Accept",
+			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+				s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+				s.accepts[ "*" ]
+		);
+
+		// Check for headers option
+		for ( i in s.headers ) {
+			jqXHR.setRequestHeader( i, s.headers[ i ] );
+		}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+			// Abort if not done already and return
+			return jqXHR.abort();
+		}
+
+		// aborting is no longer a cancellation
+		strAbort = "abort";
+
+		// Install callbacks on deferreds
+		for ( i in { success: 1, error: 1, complete: 1 } ) {
+			jqXHR[ i ]( s[ i ] );
+		}
+
+		// Get transport
+		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+		// If no transport, we auto-abort
+		if ( !transport ) {
+			done( -1, "No Transport" );
+		} else {
+			jqXHR.readyState = 1;
+
+			// Send global event
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+			}
+			// Timeout
+			if ( s.async && s.timeout > 0 ) {
+				timeoutTimer = setTimeout(function() {
+					jqXHR.abort("timeout");
+				}, s.timeout );
+			}
+
+			try {
+				state = 1;
+				transport.send( requestHeaders, done );
+			} catch ( e ) {
+				// Propagate exception as error if not done
+				if ( state < 2 ) {
+					done( -1, e );
+				// Simply rethrow otherwise
+				} else {
+					throw e;
+				}
+			}
+		}
+
+		// Callback for when everything is done
+		function done( status, nativeStatusText, responses, headers ) {
+			var isSuccess, success, error, response, modified,
+				statusText = nativeStatusText;
+
+			// Called once
+			if ( state === 2 ) {
+				return;
+			}
+
+			// State is "done" now
+			state = 2;
+
+			// Clear timeout if it exists
+			if ( timeoutTimer ) {
+				clearTimeout( timeoutTimer );
+			}
+
+			// Dereference transport for early garbage collection
+			// (no matter how long the jqXHR object will be used)
+			transport = undefined;
+
+			// Cache response headers
+			responseHeadersString = headers || "";
+
+			// Set readyState
+			jqXHR.readyState = status > 0 ? 4 : 0;
+
+			// Determine if successful
+			isSuccess = status >= 200 && status < 300 || status === 304;
+
+			// Get response data
+			if ( responses ) {
+				response = ajaxHandleResponses( s, jqXHR, responses );
+			}
+
+			// Convert no matter what (that way responseXXX fields are always set)
+			response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+			// If successful, handle type chaining
+			if ( isSuccess ) {
+
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+				if ( s.ifModified ) {
+					modified = jqXHR.getResponseHeader("Last-Modified");
+					if ( modified ) {
+						jQuery.lastModified[ cacheURL ] = modified;
+					}
+					modified = jqXHR.getResponseHeader("etag");
+					if ( modified ) {
+						jQuery.etag[ cacheURL ] = modified;
+					}
+				}
+
+				// if no content
+				if ( status === 204 || s.type === "HEAD" ) {
+					statusText = "nocontent";
+
+				// if not modified
+				} else if ( status === 304 ) {
+					statusText = "notmodified";
+
+				// If we have data, let's convert it
+				} else {
+					statusText = response.state;
+					success = response.data;
+					error = response.error;
+					isSuccess = !error;
+				}
+			} else {
+				// We extract error from statusText
+				// then normalize statusText and status for non-aborts
+				error = statusText;
+				if ( status || !statusText ) {
+					statusText = "error";
+					if ( status < 0 ) {
+						status = 0;
+					}
+				}
+			}
+
+			// Set data for the fake xhr object
+			jqXHR.status = status;
+			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+			// Success/Error
+			if ( isSuccess ) {
+				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+			} else {
+				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+			}
+
+			// Status-dependent callbacks
+			jqXHR.statusCode( statusCode );
+			statusCode = undefined;
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+					[ jqXHR, s, isSuccess ? success : error ] );
+			}
+
+			// Complete
+			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+				// Handle the global AJAX counter
+				if ( !( --jQuery.active ) ) {
+					jQuery.event.trigger("ajaxStop");
+				}
+			}
+		}
+
+		return jqXHR;
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get( url, data, callback, "json" );
+	},
+
+	getScript: function( url, callback ) {
+		return jQuery.get( url, undefined, callback, "script" );
+	}
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+	jQuery[ method ] = function( url, data, callback, type ) {
+		// shift arguments if data argument was omitted
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = undefined;
+		}
+
+		return jQuery.ajax({
+			url: url,
+			type: method,
+			dataType: type,
+			data: data,
+			success: callback
+		});
+	};
+});
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+	var firstDataType, ct, finalDataType, type,
+		contents = s.contents,
+		dataTypes = s.dataTypes;
+
+	// Remove auto dataType and get content-type in the process
+	while( dataTypes[ 0 ] === "*" ) {
+		dataTypes.shift();
+		if ( ct === undefined ) {
+			ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+		}
+	}
+
+	// Check if we're dealing with a known content-type
+	if ( ct ) {
+		for ( type in contents ) {
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
+				dataTypes.unshift( type );
+				break;
+			}
+		}
+	}
+
+	// Check to see if we have a response for the expected dataType
+	if ( dataTypes[ 0 ] in responses ) {
+		finalDataType = dataTypes[ 0 ];
+	} else {
+		// Try convertible dataTypes
+		for ( type in responses ) {
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+				finalDataType = type;
+				break;
+			}
+			if ( !firstDataType ) {
+				firstDataType = type;
+			}
+		}
+		// Or just use first one
+		finalDataType = finalDataType || firstDataType;
+	}
+
+	// If we found a dataType
+	// We add the dataType to the list if needed
+	// and return the corresponding response
+	if ( finalDataType ) {
+		if ( finalDataType !== dataTypes[ 0 ] ) {
+			dataTypes.unshift( finalDataType );
+		}
+		return responses[ finalDataType ];
+	}
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+	var conv2, current, conv, tmp, prev,
+		converters = {},
+		// Work with a copy of dataTypes in case we need to modify it for conversion
+		dataTypes = s.dataTypes.slice();
+
+	// Create converters map with lowercased keys
+	if ( dataTypes[ 1 ] ) {
+		for ( conv in s.converters ) {
+			converters[ conv.toLowerCase() ] = s.converters[ conv ];
+		}
+	}
+
+	current = dataTypes.shift();
+
+	// Convert to each sequential dataType
+	while ( current ) {
+
+		if ( s.responseFields[ current ] ) {
+			jqXHR[ s.responseFields[ current ] ] = response;
+		}
+
+		// Apply the dataFilter if provided
+		if ( !prev && isSuccess && s.dataFilter ) {
+			response = s.dataFilter( response, s.dataType );
+		}
+
+		prev = current;
+		current = dataTypes.shift();
+
+		if ( current ) {
+
+			// There's only work to do if current dataType is non-auto
+			if ( current === "*" ) {
+
+				current = prev;
+
+			// Convert response if prev dataType is non-auto and differs from current
+			} else if ( prev !== "*" && prev !== current ) {
+
+				// Seek a direct converter
+				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+				// If none found, seek a pair
+				if ( !conv ) {
+					for ( conv2 in converters ) {
+
+						// If conv2 outputs current
+						tmp = conv2.split( " " );
+						if ( tmp[ 1 ] === current ) {
+
+							// If prev can be converted to accepted input
+							conv = converters[ prev + " " + tmp[ 0 ] ] ||
+								converters[ "* " + tmp[ 0 ] ];
+							if ( conv ) {
+								// Condense equivalence converters
+								if ( conv === true ) {
+									conv = converters[ conv2 ];
+
+								// Otherwise, insert the intermediate dataType
+								} else if ( converters[ conv2 ] !== true ) {
+									current = tmp[ 0 ];
+									dataTypes.unshift( tmp[ 1 ] );
+								}
+								break;
+							}
+						}
+					}
+				}
+
+				// Apply converter (if not an equivalence)
+				if ( conv !== true ) {
+
+					// Unless errors are allowed to bubble, catch and return them
+					if ( conv && s[ "throws" ] ) {
+						response = conv( response );
+					} else {
+						try {
+							response = conv( response );
+						} catch ( e ) {
+							return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+						}
+					}
+				}
+			}
+		}
+	}
+
+	return { state: "success", data: response };
+}
+// Install script dataType
+jQuery.ajaxSetup({
+	accepts: {
+		script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+	},
+	contents: {
+		script: /(?:java|ecma)script/
+	},
+	converters: {
+		"text script": function( text ) {
+			jQuery.globalEval( text );
+			return text;
+		}
+	}
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+	if ( s.cache === undefined ) {
+		s.cache = false;
+	}
+	if ( s.crossDomain ) {
+		s.type = "GET";
+		s.global = false;
+	}
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+	// This transport only deals with cross domain requests
+	if ( s.crossDomain ) {
+
+		var script,
+			head = document.head || jQuery("head")[0] || document.documentElement;
+
+		return {
+
+			send: function( _, callback ) {
+
+				script = document.createElement("script");
+
+				script.async = true;
+
+				if ( s.scriptCharset ) {
+					script.charset = s.scriptCharset;
+				}
+
+				script.src = s.url;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+						// Handle memory leak in IE
+						script.onload = script.onreadystatechange = null;
+
+						// Remove the script
+						if ( script.parentNode ) {
+							script.parentNode.removeChild( script );
+						}
+
+						// Dereference the script
+						script = null;
+
+						// Callback if not abort
+						if ( !isAbort ) {
+							callback( 200, "success" );
+						}
+					}
+				};
+
+				// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
+				// Use native DOM manipulation to avoid our domManip AJAX trickery
+				head.insertBefore( script, head.firstChild );
+			},
+
+			abort: function() {
+				if ( script ) {
+					script.onload( undefined, true );
+				}
+			}
+		};
+	}
+});
+var oldCallbacks = [],
+	rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+	jsonp: "callback",
+	jsonpCallback: function() {
+		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
+		this[ callback ] = true;
+		return callback;
+	}
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+	var callbackName, overwritten, responseContainer,
+		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+			"url" :
+			typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+		);
+
+	// Handle iff the expected data type is "jsonp" or we have a parameter to set
+	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+		// Get callback name, remembering preexisting value associated with it
+		callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+			s.jsonpCallback() :
+			s.jsonpCallback;
+
+		// Insert callback into url or form data
+		if ( jsonProp ) {
+			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+		} else if ( s.jsonp !== false ) {
+			s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+		}
+
+		// Use data converter to retrieve json after script execution
+		s.converters["script json"] = function() {
+			if ( !responseContainer ) {
+				jQuery.error( callbackName + " was not called" );
+			}
+			return responseContainer[ 0 ];
+		};
+
+		// force json dataType
+		s.dataTypes[ 0 ] = "json";
+
+		// Install callback
+		overwritten = window[ callbackName ];
+		window[ callbackName ] = function() {
+			responseContainer = arguments;
+		};
+
+		// Clean-up function (fires after converters)
+		jqXHR.always(function() {
+			// Restore preexisting value
+			window[ callbackName ] = overwritten;
+
+			// Save back as free
+			if ( s[ callbackName ] ) {
+				// make sure that re-using the options doesn't screw things around
+				s.jsonpCallback = originalSettings.jsonpCallback;
+
+				// save the callback name for future use
+				oldCallbacks.push( callbackName );
+			}
+
+			// Call if it was a function and we have a response
+			if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+				overwritten( responseContainer[ 0 ] );
+			}
+
+			responseContainer = overwritten = undefined;
+		});
+
+		// Delegate to script
+		return "script";
+	}
+});
+var xhrCallbacks, xhrSupported,
+	xhrId = 0,
+	// #5280: Internet Explorer will keep connections alive if we don't abort on unload
+	xhrOnUnloadAbort = window.ActiveXObject && function() {
+		// Abort all pending requests
+		var key;
+		for ( key in xhrCallbacks ) {
+			xhrCallbacks[ key ]( undefined, true );
+		}
+	};
+
+// Functions to create xhrs
+function createStandardXHR() {
+	try {
+		return new window.XMLHttpRequest();
+	} catch( e ) {}
+}
+
+function createActiveXHR() {
+	try {
+		return new window.ActiveXObject("Microsoft.XMLHTTP");
+	} catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+	/* Microsoft failed to properly
+	 * implement the XMLHttpRequest in IE7 (can't request local files),
+	 * so we use the ActiveXObject when it is available
+	 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+	 * we need a fallback.
+	 */
+	function() {
+		return !this.isLocal && createStandardXHR() || createActiveXHR();
+	} :
+	// For all other browsers, use the standard XMLHttpRequest object
+	createStandardXHR;
+
+// Determine support properties
+xhrSupported = jQuery.ajaxSettings.xhr();
+jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+xhrSupported = jQuery.support.ajax = !!xhrSupported;
+
+// Create transport if the browser can provide an xhr
+if ( xhrSupported ) {
+
+	jQuery.ajaxTransport(function( s ) {
+		// Cross domain only allowed if supported through XMLHttpRequest
+		if ( !s.crossDomain || jQuery.support.cors ) {
+
+			var callback;
+
+			return {
+				send: function( headers, complete ) {
+
+					// Get a new xhr
+					var handle, i,
+						xhr = s.xhr();
+
+					// Open the socket
+					// Passing null username, generates a login popup on Opera (#2865)
+					if ( s.username ) {
+						xhr.open( s.type, s.url, s.async, s.username, s.password );
+					} else {
+						xhr.open( s.type, s.url, s.async );
+					}
+
+					// Apply custom fields if provided
+					if ( s.xhrFields ) {
+						for ( i in s.xhrFields ) {
+							xhr[ i ] = s.xhrFields[ i ];
+						}
+					}
+
+					// Override mime type if needed
+					if ( s.mimeType && xhr.overrideMimeType ) {
+						xhr.overrideMimeType( s.mimeType );
+					}
+
+					// X-Requested-With header
+					// For cross-domain requests, seeing as conditions for a preflight are
+					// akin to a jigsaw puzzle, we simply never set it to be sure.
+					// (it can always be set on a per-request basis or even using ajaxSetup)
+					// For same-domain requests, won't change header if already provided.
+					if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+						headers["X-Requested-With"] = "XMLHttpRequest";
+					}
+
+					// Need an extra try/catch for cross domain requests in Firefox 3
+					try {
+						for ( i in headers ) {
+							xhr.setRequestHeader( i, headers[ i ] );
+						}
+					} catch( err ) {}
+
+					// Do send the request
+					// This may raise an exception which is actually
+					// handled in jQuery.ajax (so no try/catch here)
+					xhr.send( ( s.hasContent && s.data ) || null );
+
+					// Listener
+					callback = function( _, isAbort ) {
+						var status, responseHeaders, statusText, responses;
+
+						// Firefox throws exceptions when accessing properties
+						// of an xhr when a network error occurred
+						// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+						try {
+
+							// Was never called and is aborted or complete
+							if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+								// Only called once
+								callback = undefined;
+
+								// Do not keep as active anymore
+								if ( handle ) {
+									xhr.onreadystatechange = jQuery.noop;
+									if ( xhrOnUnloadAbort ) {
+										delete xhrCallbacks[ handle ];
+									}
+								}
+
+								// If it's an abort
+								if ( isAbort ) {
+									// Abort it manually if needed
+									if ( xhr.readyState !== 4 ) {
+										xhr.abort();
+									}
+								} else {
+									responses = {};
+									status = xhr.status;
+									responseHeaders = xhr.getAllResponseHeaders();
+
+									// When requesting binary data, IE6-9 will throw an exception
+									// on any attempt to access responseText (#11426)
+									if ( typeof xhr.responseText === "string" ) {
+										responses.text = xhr.responseText;
+									}
+
+									// Firefox throws an exception when accessing
+									// statusText for faulty cross-domain requests
+									try {
+										statusText = xhr.statusText;
+									} catch( e ) {
+										// We normalize with Webkit giving an empty statusText
+										statusText = "";
+									}
+
+									// Filter status for non standard behaviors
+
+									// If the request is local and we have data: assume a success
+									// (success with no data won't get notified, that's the best we
+									// can do given current implementations)
+									if ( !status && s.isLocal && !s.crossDomain ) {
+										status = responses.text ? 200 : 404;
+									// IE - #1450: sometimes returns 1223 when it should be 204
+									} else if ( status === 1223 ) {
+										status = 204;
+									}
+								}
+							}
+						} catch( firefoxAccessException ) {
+							if ( !isAbort ) {
+								complete( -1, firefoxAccessException );
+							}
+						}
+
+						// Call complete if needed
+						if ( responses ) {
+							complete( status, statusText, responses, responseHeaders );
+						}
+					};
+
+					if ( !s.async ) {
+						// if we're in sync mode we fire the callback
+						callback();
+					} else if ( xhr.readyState === 4 ) {
+						// (IE6 & IE7) if it's in cache and has been
+						// retrieved directly we need to fire the callback
+						setTimeout( callback );
+					} else {
+						handle = ++xhrId;
+						if ( xhrOnUnloadAbort ) {
+							// Create the active xhrs callbacks list if needed
+							// and attach the unload handler
+							if ( !xhrCallbacks ) {
+								xhrCallbacks = {};
+								jQuery( window ).unload( xhrOnUnloadAbort );
+							}
+							// Add to list of active xhrs callbacks
+							xhrCallbacks[ handle ] = callback;
+						}
+						xhr.onreadystatechange = callback;
+					}
+				},
+
+				abort: function() {
+					if ( callback ) {
+						callback( undefined, true );
+					}
+				}
+			};
+		}
+	});
+}
+var fxNow, timerId,
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
+	rrun = /queueHooks$/,
+	animationPrefilters = [ defaultPrefilter ],
+	tweeners = {
+		"*": [function( prop, value ) {
+			var tween = this.createTween( prop, value ),
+				target = tween.cur(),
+				parts = rfxnum.exec( value ),
+				unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+				// Starting value computation is required for potential unit mismatches
+				start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+					rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+				scale = 1,
+				maxIterations = 20;
+
+			if ( start && start[ 3 ] !== unit ) {
+				// Trust units reported by jQuery.css
+				unit = unit || start[ 3 ];
+
+				// Make sure we update the tween properties later on
+				parts = parts || [];
+
+				// Iteratively approximate from a nonzero starting point
+				start = +target || 1;
+
+				do {
+					// If previous iteration zeroed out, double until we get *something*
+					// Use a string for doubling factor so we don't accidentally see scale as unchanged below
+					scale = scale || ".5";
+
+					// Adjust and apply
+					start = start / scale;
+					jQuery.style( tween.elem, prop, start + unit );
+
+				// Update scale, tolerating zero or NaN from tween.cur()
+				// And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+				} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+			}
+
+			// Update tween properties
+			if ( parts ) {
+				start = tween.start = +start || +target || 0;
+				tween.unit = unit;
+				// If a +=/-= token was provided, we're doing a relative animation
+				tween.end = parts[ 1 ] ?
+					start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+					+parts[ 2 ];
+			}
+
+			return tween;
+		}]
+	};
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+	setTimeout(function() {
+		fxNow = undefined;
+	});
+	return ( fxNow = jQuery.now() );
+}
+
+function createTween( value, prop, animation ) {
+	var tween,
+		collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+		index = 0,
+		length = collection.length;
+	for ( ; index < length; index++ ) {
+		if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+			// we're done with this property
+			return tween;
+		}
+	}
+}
+
+function Animation( elem, properties, options ) {
+	var result,
+		stopped,
+		index = 0,
+		length = animationPrefilters.length,
+		deferred = jQuery.Deferred().always( function() {
+			// don't match elem in the :animated selector
+			delete tick.elem;
+		}),
+		tick = function() {
+			if ( stopped ) {
+				return false;
+			}
+			var currentTime = fxNow || createFxNow(),
+				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+				// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+				temp = remaining / animation.duration || 0,
+				percent = 1 - temp,
+				index = 0,
+				length = animation.tweens.length;
+
+			for ( ; index < length ; index++ ) {
+				animation.tweens[ index ].run( percent );
+			}
+
+			deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+			if ( percent < 1 && length ) {
+				return remaining;
+			} else {
+				deferred.resolveWith( elem, [ animation ] );
+				return false;
+			}
+		},
+		animation = deferred.promise({
+			elem: elem,
+			props: jQuery.extend( {}, properties ),
+			opts: jQuery.extend( true, { specialEasing: {} }, options ),
+			originalProperties: properties,
+			originalOptions: options,
+			startTime: fxNow || createFxNow(),
+			duration: options.duration,
+			tweens: [],
+			createTween: function( prop, end ) {
+				var tween = jQuery.Tween( elem, animation.opts, prop, end,
+						animation.opts.specialEasing[ prop ] || animation.opts.easing );
+				animation.tweens.push( tween );
+				return tween;
+			},
+			stop: function( gotoEnd ) {
+				var index = 0,
+					// if we are going to the end, we want to run all the tweens
+					// otherwise we skip this part
+					length = gotoEnd ? animation.tweens.length : 0;
+				if ( stopped ) {
+					return this;
+				}
+				stopped = true;
+				for ( ; index < length ; index++ ) {
+					animation.tweens[ index ].run( 1 );
+				}
+
+				// resolve when we played the last frame
+				// otherwise, reject
+				if ( gotoEnd ) {
+					deferred.resolveWith( elem, [ animation, gotoEnd ] );
+				} else {
+					deferred.rejectWith( elem, [ animation, gotoEnd ] );
+				}
+				return this;
+			}
+		}),
+		props = animation.props;
+
+	propFilter( props, animation.opts.specialEasing );
+
+	for ( ; index < length ; index++ ) {
+		result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+		if ( result ) {
+			return result;
+		}
+	}
+
+	jQuery.map( props, createTween, animation );
+
+	if ( jQuery.isFunction( animation.opts.start ) ) {
+		animation.opts.start.call( elem, animation );
+	}
+
+	jQuery.fx.timer(
+		jQuery.extend( tick, {
+			elem: elem,
+			anim: animation,
+			queue: animation.opts.queue
+		})
+	);
+
+	// attach callbacks from options
+	return animation.progress( animation.opts.progress )
+		.done( animation.opts.done, animation.opts.complete )
+		.fail( animation.opts.fail )
+		.always( animation.opts.always );
+}
+
+function propFilter( props, specialEasing ) {
+	var index, name, easing, value, hooks;
+
+	// camelCase, specialEasing and expand cssHook pass
+	for ( index in props ) {
+		name = jQuery.camelCase( index );
+		easing = specialEasing[ name ];
+		value = props[ index ];
+		if ( jQuery.isArray( value ) ) {
+			easing = value[ 1 ];
+			value = props[ index ] = value[ 0 ];
+		}
+
+		if ( index !== name ) {
+			props[ name ] = value;
+			delete props[ index ];
+		}
+
+		hooks = jQuery.cssHooks[ name ];
+		if ( hooks && "expand" in hooks ) {
+			value = hooks.expand( value );
+			delete props[ name ];
+
+			// not quite $.extend, this wont overwrite keys already present.
+			// also - reusing 'index' from above because we have the correct "name"
+			for ( index in value ) {
+				if ( !( index in props ) ) {
+					props[ index ] = value[ index ];
+					specialEasing[ index ] = easing;
+				}
+			}
+		} else {
+			specialEasing[ name ] = easing;
+		}
+	}
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+	tweener: function( props, callback ) {
+		if ( jQuery.isFunction( props ) ) {
+			callback = props;
+			props = [ "*" ];
+		} else {
+			props = props.split(" ");
+		}
+
+		var prop,
+			index = 0,
+			length = props.length;
+
+		for ( ; index < length ; index++ ) {
+			prop = props[ index ];
+			tweeners[ prop ] = tweeners[ prop ] || [];
+			tweeners[ prop ].unshift( callback );
+		}
+	},
+
+	prefilter: function( callback, prepend ) {
+		if ( prepend ) {
+			animationPrefilters.unshift( callback );
+		} else {
+			animationPrefilters.push( callback );
+		}
+	}
+});
+
+function defaultPrefilter( elem, props, opts ) {
+	/* jshint validthis: true */
+	var prop, value, toggle, tween, hooks, oldfire,
+		anim = this,
+		orig = {},
+		style = elem.style,
+		hidden = elem.nodeType && isHidden( elem ),
+		dataShow = jQuery._data( elem, "fxshow" );
+
+	// handle queue: false promises
+	if ( !opts.queue ) {
+		hooks = jQuery._queueHooks( elem, "fx" );
+		if ( hooks.unqueued == null ) {
+			hooks.unqueued = 0;
+			oldfire = hooks.empty.fire;
+			hooks.empty.fire = function() {
+				if ( !hooks.unqueued ) {
+					oldfire();
+				}
+			};
+		}
+		hooks.unqueued++;
+
+		anim.always(function() {
+			// doing this makes sure that the complete handler will be called
+			// before this completes
+			anim.always(function() {
+				hooks.unqueued--;
+				if ( !jQuery.queue( elem, "fx" ).length ) {
+					hooks.empty.fire();
+				}
+			});
+		});
+	}
+
+	// height/width overflow pass
+	if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+		// Make sure that nothing sneaks out
+		// Record all 3 overflow attributes because IE does not
+		// change the overflow attribute when overflowX and
+		// overflowY are set to the same value
+		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+		// Set display property to inline-block for height/width
+		// animations on inline elements that are having width/height animated
+		if ( jQuery.css( elem, "display" ) === "inline" &&
+				jQuery.css( elem, "float" ) === "none" ) {
+
+			// inline-level elements accept inline-block;
+			// block-level elements need to be inline with layout
+			if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
+				style.display = "inline-block";
+
+			} else {
+				style.zoom = 1;
+			}
+		}
+	}
+
+	if ( opts.overflow ) {
+		style.overflow = "hidden";
+		if ( !jQuery.support.shrinkWrapBlocks ) {
+			anim.always(function() {
+				style.overflow = opts.overflow[ 0 ];
+				style.overflowX = opts.overflow[ 1 ];
+				style.overflowY = opts.overflow[ 2 ];
+			});
+		}
+	}
+
+
+	// show/hide pass
+	for ( prop in props ) {
+		value = props[ prop ];
+		if ( rfxtypes.exec( value ) ) {
+			delete props[ prop ];
+			toggle = toggle || value === "toggle";
+			if ( value === ( hidden ? "hide" : "show" ) ) {
+				continue;
+			}
+			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+		}
+	}
+
+	if ( !jQuery.isEmptyObject( orig ) ) {
+		if ( dataShow ) {
+			if ( "hidden" in dataShow ) {
+				hidden = dataShow.hidden;
+			}
+		} else {
+			dataShow = jQuery._data( elem, "fxshow", {} );
+		}
+
+		// store state if its toggle - enables .stop().toggle() to "reverse"
+		if ( toggle ) {
+			dataShow.hidden = !hidden;
+		}
+		if ( hidden ) {
+			jQuery( elem ).show();
+		} else {
+			anim.done(function() {
+				jQuery( elem ).hide();
+			});
+		}
+		anim.done(function() {
+			var prop;
+			jQuery._removeData( elem, "fxshow" );
+			for ( prop in orig ) {
+				jQuery.style( elem, prop, orig[ prop ] );
+			}
+		});
+		for ( prop in orig ) {
+			tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+			if ( !( prop in dataShow ) ) {
+				dataShow[ prop ] = tween.start;
+				if ( hidden ) {
+					tween.end = tween.start;
+					tween.start = prop === "width" || prop === "height" ? 1 : 0;
+				}
+			}
+		}
+	}
+}
+
+function Tween( elem, options, prop, end, easing ) {
+	return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+	constructor: Tween,
+	init: function( elem, options, prop, end, easing, unit ) {
+		this.elem = elem;
+		this.prop = prop;
+		this.easing = easing || "swing";
+		this.options = options;
+		this.start = this.now = this.cur();
+		this.end = end;
+		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+	},
+	cur: function() {
+		var hooks = Tween.propHooks[ this.prop ];
+
+		return hooks && hooks.get ?
+			hooks.get( this ) :
+			Tween.propHooks._default.get( this );
+	},
+	run: function( percent ) {
+		var eased,
+			hooks = Tween.propHooks[ this.prop ];
+
+		if ( this.options.duration ) {
+			this.pos = eased = jQuery.easing[ this.easing ](
+				percent, this.options.duration * percent, 0, 1, this.options.duration
+			);
+		} else {
+			this.pos = eased = percent;
+		}
+		this.now = ( this.end - this.start ) * eased + this.start;
+
+		if ( this.options.step ) {
+			this.options.step.call( this.elem, this.now, this );
+		}
+
+		if ( hooks && hooks.set ) {
+			hooks.set( this );
+		} else {
+			Tween.propHooks._default.set( this );
+		}
+		return this;
+	}
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+	_default: {
+		get: function( tween ) {
+			var result;
+
+			if ( tween.elem[ tween.prop ] != null &&
+				(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+				return tween.elem[ tween.prop ];
+			}
+
+			// passing an empty string as a 3rd parameter to .css will automatically
+			// attempt a parseFloat and fallback to a string if the parse fails
+			// so, simple values such as "10px" are parsed to Float.
+			// complex values such as "rotate(1rad)" are returned as is.
+			result = jQuery.css( tween.elem, tween.prop, "" );
+			// Empty strings, null, undefined and "auto" are converted to 0.
+			return !result || result === "auto" ? 0 : result;
+		},
+		set: function( tween ) {
+			// use step hook for back compat - use cssHook if its there - use .style if its
+			// available and use plain properties where available
+			if ( jQuery.fx.step[ tween.prop ] ) {
+				jQuery.fx.step[ tween.prop ]( tween );
+			} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+			} else {
+				tween.elem[ tween.prop ] = tween.now;
+			}
+		}
+	}
+};
+
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+	set: function( tween ) {
+		if ( tween.elem.nodeType && tween.elem.parentNode ) {
+			tween.elem[ tween.prop ] = tween.now;
+		}
+	}
+};
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+	var cssFn = jQuery.fn[ name ];
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return speed == null || typeof speed === "boolean" ?
+			cssFn.apply( this, arguments ) :
+			this.animate( genFx( name, true ), speed, easing, callback );
+	};
+});
+
+jQuery.fn.extend({
+	fadeTo: function( speed, to, easing, callback ) {
+
+		// show any hidden elements after setting opacity to 0
+		return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+			// animate to the value specified
+			.end().animate({ opacity: to }, speed, easing, callback );
+	},
+	animate: function( prop, speed, easing, callback ) {
+		var empty = jQuery.isEmptyObject( prop ),
+			optall = jQuery.speed( speed, easing, callback ),
+			doAnimation = function() {
+				// Operate on a copy of prop so per-property easing won't be lost
+				var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+				// Empty animations, or finishing resolves immediately
+				if ( empty || jQuery._data( this, "finish" ) ) {
+					anim.stop( true );
+				}
+			};
+			doAnimation.finish = doAnimation;
+
+		return empty || optall.queue === false ?
+			this.each( doAnimation ) :
+			this.queue( optall.queue, doAnimation );
+	},
+	stop: function( type, clearQueue, gotoEnd ) {
+		var stopQueue = function( hooks ) {
+			var stop = hooks.stop;
+			delete hooks.stop;
+			stop( gotoEnd );
+		};
+
+		if ( typeof type !== "string" ) {
+			gotoEnd = clearQueue;
+			clearQueue = type;
+			type = undefined;
+		}
+		if ( clearQueue && type !== false ) {
+			this.queue( type || "fx", [] );
+		}
+
+		return this.each(function() {
+			var dequeue = true,
+				index = type != null && type + "queueHooks",
+				timers = jQuery.timers,
+				data = jQuery._data( this );
+
+			if ( index ) {
+				if ( data[ index ] && data[ index ].stop ) {
+					stopQueue( data[ index ] );
+				}
+			} else {
+				for ( index in data ) {
+					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+						stopQueue( data[ index ] );
+					}
+				}
+			}
+
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+					timers[ index ].anim.stop( gotoEnd );
+					dequeue = false;
+					timers.splice( index, 1 );
+				}
+			}
+
+			// start the next in the queue if the last step wasn't forced
+			// timers currently will call their complete callbacks, which will dequeue
+			// but only if they were gotoEnd
+			if ( dequeue || !gotoEnd ) {
+				jQuery.dequeue( this, type );
+			}
+		});
+	},
+	finish: function( type ) {
+		if ( type !== false ) {
+			type = type || "fx";
+		}
+		return this.each(function() {
+			var index,
+				data = jQuery._data( this ),
+				queue = data[ type + "queue" ],
+				hooks = data[ type + "queueHooks" ],
+				timers = jQuery.timers,
+				length = queue ? queue.length : 0;
+
+			// enable finishing flag on private data
+			data.finish = true;
+
+			// empty the queue first
+			jQuery.queue( this, type, [] );
+
+			if ( hooks && hooks.stop ) {
+				hooks.stop.call( this, true );
+			}
+
+			// look for any active animations, and finish them
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+					timers[ index ].anim.stop( true );
+					timers.splice( index, 1 );
+				}
+			}
+
+			// look for any animations in the old queue and finish them
+			for ( index = 0; index < length; index++ ) {
+				if ( queue[ index ] && queue[ index ].finish ) {
+					queue[ index ].finish.call( this );
+				}
+			}
+
+			// turn off finishing flag
+			delete data.finish;
+		});
+	}
+});
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+	var which,
+		attrs = { height: type },
+		i = 0;
+
+	// if we include width, step value is 1 to do all cssExpand values,
+	// if we don't include width, step value is 2 to skip over Left and Right
+	includeWidth = includeWidth? 1 : 0;
+	for( ; i < 4 ; i += 2 - includeWidth ) {
+		which = cssExpand[ i ];
+		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+	}
+
+	if ( includeWidth ) {
+		attrs.opacity = attrs.width = type;
+	}
+
+	return attrs;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+	slideDown: genFx("show"),
+	slideUp: genFx("hide"),
+	slideToggle: genFx("toggle"),
+	fadeIn: { opacity: "show" },
+	fadeOut: { opacity: "hide" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+		complete: fn || !fn && easing ||
+			jQuery.isFunction( speed ) && speed,
+		duration: speed,
+		easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+	};
+
+	opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+		opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+	// normalize opt.queue - true/undefined/null -> "fx"
+	if ( opt.queue == null || opt.queue === true ) {
+		opt.queue = "fx";
+	}
+
+	// Queueing
+	opt.old = opt.complete;
+
+	opt.complete = function() {
+		if ( jQuery.isFunction( opt.old ) ) {
+			opt.old.call( this );
+		}
+
+		if ( opt.queue ) {
+			jQuery.dequeue( this, opt.queue );
+		}
+	};
+
+	return opt;
+};
+
+jQuery.easing = {
+	linear: function( p ) {
+		return p;
+	},
+	swing: function( p ) {
+		return 0.5 - Math.cos( p*Math.PI ) / 2;
+	}
+};
+
+jQuery.timers = [];
+jQuery.fx = Tween.prototype.init;
+jQuery.fx.tick = function() {
+	var timer,
+		timers = jQuery.timers,
+		i = 0;
+
+	fxNow = jQuery.now();
+
+	for ( ; i < timers.length; i++ ) {
+		timer = timers[ i ];
+		// Checks the timer has not already been removed
+		if ( !timer() && timers[ i ] === timer ) {
+			timers.splice( i--, 1 );
+		}
+	}
+
+	if ( !timers.length ) {
+		jQuery.fx.stop();
+	}
+	fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+	if ( timer() && jQuery.timers.push( timer ) ) {
+		jQuery.fx.start();
+	}
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+	if ( !timerId ) {
+		timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+	}
+};
+
+jQuery.fx.stop = function() {
+	clearInterval( timerId );
+	timerId = null;
+};
+
+jQuery.fx.speeds = {
+	slow: 600,
+	fast: 200,
+	// Default speed
+	_default: 400
+};
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.animated = function( elem ) {
+		return jQuery.grep(jQuery.timers, function( fn ) {
+			return elem === fn.elem;
+		}).length;
+	};
+}
+jQuery.fn.offset = function( options ) {
+	if ( arguments.length ) {
+		return options === undefined ?
+			this :
+			this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+	}
+
+	var docElem, win,
+		box = { top: 0, left: 0 },
+		elem = this[ 0 ],
+		doc = elem && elem.ownerDocument;
+
+	if ( !doc ) {
+		return;
+	}
+
+	docElem = doc.documentElement;
+
+	// Make sure it's not a disconnected DOM node
+	if ( !jQuery.contains( docElem, elem ) ) {
+		return box;
+	}
+
+	// If we don't have gBCR, just use 0,0 rather than error
+	// BlackBerry 5, iOS 3 (original iPhone)
+	if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
+		box = elem.getBoundingClientRect();
+	}
+	win = getWindow( doc );
+	return {
+		top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
+		left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
+	};
+};
+
+jQuery.offset = {
+
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+			curTop = curPosition.top;
+			curLeft = curPosition.left;
+		} else {
+			curTop = parseFloat( curCSSTop ) || 0;
+			curLeft = parseFloat( curCSSLeft ) || 0;
+		}
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if ( options.top != null ) {
+			props.top = ( options.top - curOffset.top ) + curTop;
+		}
+		if ( options.left != null ) {
+			props.left = ( options.left - curOffset.left ) + curLeft;
+		}
+
+		if ( "using" in options ) {
+			options.using.call( elem, props );
+		} else {
+			curElem.css( props );
+		}
+	}
+};
+
+
+jQuery.fn.extend({
+
+	position: function() {
+		if ( !this[ 0 ] ) {
+			return;
+		}
+
+		var offsetParent, offset,
+			parentOffset = { top: 0, left: 0 },
+			elem = this[ 0 ];
+
+		// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
+		if ( jQuery.css( elem, "position" ) === "fixed" ) {
+			// we assume that getBoundingClientRect is available when computed position is fixed
+			offset = elem.getBoundingClientRect();
+		} else {
+			// Get *real* offsetParent
+			offsetParent = this.offsetParent();
+
+			// Get correct offsets
+			offset = this.offset();
+			if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+				parentOffset = offsetParent.offset();
+			}
+
+			// Add offsetParent borders
+			parentOffset.top  += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+			parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+		}
+
+		// Subtract parent offsets and element margins
+		// note: when an element has margin: auto the offsetLeft and marginLeft
+		// are the same in Safari causing offset.left to incorrectly be 0
+		return {
+			top:  offset.top  - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
+		};
+	},
+
+	offsetParent: function() {
+		return this.map(function() {
+			var offsetParent = this.offsetParent || docElem;
+			while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
+				offsetParent = offsetParent.offsetParent;
+			}
+			return offsetParent || docElem;
+		});
+	}
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+	var top = /Y/.test( prop );
+
+	jQuery.fn[ method ] = function( val ) {
+		return jQuery.access( this, function( elem, method, val ) {
+			var win = getWindow( elem );
+
+			if ( val === undefined ) {
+				return win ? (prop in win) ? win[ prop ] :
+					win.document.documentElement[ method ] :
+					elem[ method ];
+			}
+
+			if ( win ) {
+				win.scrollTo(
+					!top ? val : jQuery( win ).scrollLeft(),
+					top ? val : jQuery( win ).scrollTop()
+				);
+
+			} else {
+				elem[ method ] = val;
+			}
+		}, method, val, arguments.length, null );
+	};
+});
+
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ?
+		elem :
+		elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+			false;
+}
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+		// margin is only for outerHeight, outerWidth
+		jQuery.fn[ funcName ] = function( margin, value ) {
+			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+			return jQuery.access( this, function( elem, type, value ) {
+				var doc;
+
+				if ( jQuery.isWindow( elem ) ) {
+					// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+					// isn't a whole lot we can do. See pull request at this URL for discussion:
+					// https://github.com/jquery/jquery/pull/764
+					return elem.document.documentElement[ "client" + name ];
+				}
+
+				// Get document width or height
+				if ( elem.nodeType === 9 ) {
+					doc = elem.documentElement;
+
+					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+					// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+					return Math.max(
+						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+						elem.body[ "offset" + name ], doc[ "offset" + name ],
+						doc[ "client" + name ]
+					);
+				}
+
+				return value === undefined ?
+					// Get width or height on the element, requesting but not forcing parseFloat
+					jQuery.css( elem, type, extra ) :
+
+					// Set width or height on the element
+					jQuery.style( elem, type, value, extra );
+			}, type, chainable ? margin : undefined, chainable, null );
+		};
+	});
+});
+// Limit scope pollution from any deprecated API
+// (function() {
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+	return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// })();
+if ( typeof module === "object" && module && typeof module.exports === "object" ) {
+	// Expose jQuery as module.exports in loaders that implement the Node
+	// module pattern (including browserify). Do not create the global, since
+	// the user will be storing it themselves locally, and globals are frowned
+	// upon in the Node module world.
+	module.exports = jQuery;
+} else {
+	// Otherwise expose jQuery to the global object as usual
+	window.jQuery = window.$ = jQuery;
+
+	// Register as a named AMD module, since jQuery can be concatenated with other
+	// files that may use define, but not via a proper concatenation script that
+	// understands anonymous AMD modules. A named AMD is safest and most robust
+	// way to register. Lowercase jquery is used because AMD module names are
+	// derived from file names, and jQuery is normally delivered in a lowercase
+	// file name. Do this after creating the global so that if an AMD module wants
+	// to call noConflict to hide this version of jQuery, it will work.
+	if ( typeof define === "function" && define.amd ) {
+		define( "jquery", [], function () { return jQuery; } );
+	}
+}
+
+})( window );

+ 334 - 0
hadoop-tools/hadoop-sls/src/main/html/showSimulationTrace.html

@@ -0,0 +1,334 @@
+<!--
+ Licensed 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. See accompanying LICENSE file.
+-->
+<!doctype>
+<html>
+<head>
+  <meta charset="utf-8">
+  <link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
+  <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
+  <style type="text/css">
+    body {
+    font: 20px sans-serif;
+    }
+
+    .axis path,
+    .axis line {
+    fill: none;
+    stroke: #000;
+    shape-rendering: crispEdges;
+    }
+    .axis text {
+    font-family: sans-serif;
+    font-size: 20px;
+    }
+
+    .line {
+    fill: none;
+    stroke: steelblue;
+    stroke-width: 3px;
+    }
+
+    .legend {
+    padding: 1px;
+    font: 18px sans-serif;
+    background: yellow;
+    box-shadow: 2px 2px 1px #888;
+    }
+
+    .title {
+    font: 24px sans-serif;
+    }
+    .divborder {
+    border-width: 1px;
+    border-style: solid;
+    border-color: black;
+    margin-top:10px
+    }
+  </style>
+  <script src="js/thirdparty/d3.v3.js"></script>
+  <script src="js/thirdparty/jquery.js"></script>
+  <script src="js/thirdparty/bootstrap.min.js"></script>
+
+</head>
+
+<body>
+<div class="row">
+  <div class="offset5" style="margin-top:20px; margin-bottom:20px">
+    Select the generated metrics log file (realtimetrack.json): <input type='file' id='jsonfile' /> <input type='button' value='Generate !' onClick='draw()' /><br>
+  </div>
+</div>
+
+<div class="row">
+  <div class="divborder span8" style="margin-left:50px" id="area1"></div>
+  <div class="divborder span8" id="area2"></div>
+</div>
+
+<div class="row">
+  <div class="divborder span8" style="margin-left:50px" id="area3"></div>
+  <div class="divborder span8" id="area4"></div>
+</div>
+
+<div class="row">
+  <div class="divborder span8" style="margin-left:50px" id="area5"></div>
+  <div class="divborder span8" id="area6"></div>
+</div>
+
+<div class="row">
+  <div class="divborder span8" style="margin-left:50px" id="area7"></div>
+  <div class="span7" id="area8"></div>
+</div>
+<p>&nbsp;</p>
+<script>
+// select file and draw
+function draw() {
+var filepath = document.getElementById('jsonfile').value;
+if (filepath) {
+for (var i = 1; i < 9; i ++) {
+$('#area' + i).empty();
+}
+filepath = filepath.replace("C:\\fakepath\\", "");
+drawCharts(filepath);
+} else {
+alert('choose file firstly.');
+}
+}
+
+function drawCharts(filepath) {
+$.getJSON(filepath, function(data) {
+var numQueues = 0;
+var queueNames = new Array();
+for (var j in data[0]) {
+if (j.substring(0, 'queue'.length) === 'queue') {
+queueNames[numQueues] = j;
+numQueues ++;
+}
+}
+numQueues /= 2;
+
+// create graph
+$.getJSON(filepath, function(data) {
+var basetime = data[0].time;
+data.forEach(function(d) {
+d.time = (d.time - basetime) / 1000;
+});
+
+var legends = ["running.applications", "running.containers"];
+drawEachChart("#area1", data, legends, "Cluster running applications & containers", "Number", 0, 0);
+legends = ["jvm.free.memory", "jvm.max.memory", "jvm.total.memory"];
+drawEachChart("#area2", data, legends, "JVM memory", "Memory (GB)", 0, 0);
+legends = ["cluster.allocated.memory", "cluster.available.memory"];
+drawEachChart("#area3", data, legends, "Cluster allocated & available memory", "Memory (GB)", 0, 0);
+legends = ["cluster.allocated.vcores", "cluster.available.vcores"];
+drawEachChart("#area4", data, legends, "Cluster allocated & available vcores", "Number", 0, 0);
+
+for (var i = 0; i < numQueues; i ++) {
+legends[i] = queueNames[i * 2];
+}
+drawEachChart("#area5", data, legends, "Queue allocated memory", "Memory (GB)", 1, 100);
+for (var i = 0; i < numQueues; i ++) {
+legends[i] = queueNames[i * 2 + 1];
+}
+drawEachChart("#area6", data, legends, "Queue allocated vcores", "VCores", 1, 90);
+
+legends = [
+"scheduler.allocate.timecost",
+"scheduler.handle-NODE_ADDED.timecost", "scheduler.handle-NODE_REMOVED.timecost",
+"scheduler.handle-NODE_UPDATE.timecost", "scheduler.handle-APP_ADDED.timecost",
+"scheduler.handle-APP_REMOVED.timecost", "scheduler.handle-CONTAINER_EXPIRED.timecost"
+];
+drawEachChart("#area7", data, legends, "Scheduler allocate & handle operations timecost", "Timecost (ms)", 0, 210);
+});
+});
+}
+
+// draw different chart
+function drawEachChart(chartArea, data, legends, title, yLabelTitle, isArea, pl) {
+// drawchart
+var margin = {top: 50, right: 250, bottom: 50, left: 70};
+var width = 800 - margin.left - margin.right;
+var height = 420 - margin.top - margin.bottom;
+
+var x = d3.scale.linear().range([0, width]);
+var y = d3.scale.linear().range([height, 0]);
+var xAxis = d3.svg.axis().scale(x).orient("bottom");
+var yAxis = d3.svg.axis().scale(y).orient("left");
+
+var color = d3.scale.category10();
+
+if (isArea == 1){
+var area = d3.svg.area()
+.x(function(d) { return x(d.time); })
+.y0(function(d) { return y(d.y0); })
+.y1(function(d) { return y(d.y0 + d.y); });
+
+var stack = d3.layout.stack()
+.values(function(d) { return d.values; });
+
+// create chart
+var svg = d3.select(chartArea).append("svg")
+.attr("width", width + margin.left + margin.right)
+.attr("height", height + margin.top + margin.bottom)
+.append("g")
+.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+
+color.domain(d3.keys(data[0])
+.filter(function(key) {return $.inArray(key, legends) !== -1; }));
+
+var points = stack(color.domain().map(function(name) {
+return {
+name: name,
+values: data.map(function(d) {
+return {time: d.time, y: d[name]};
+})
+};
+}));
+
+// x & y
+x.domain(d3.extent(data, function(d) { return d.time; }));
+y.domain([
+d3.min(points, function(c) {
+return 0.9 * d3.min(c.values, function(v) { return v.y; }); }),
+d3.max(points, function(c) {
+return 1.1 * d3.max(c.values, function(v) { return v.y + v.y0; }); })
+]);
+
+svg.append("g").attr("class", "x axis")
+.attr("transform", "translate(0," + height + ")")
+.call(xAxis)
+.append("text")
+.attr("transform", "translate(" + (width / 2) + ", 45)")
+.style("text-anchor", "middle")
+.text("Time (s)");
+
+svg.append("g")
+.attr("class", "y axis")
+.call(yAxis)
+.append("text")
+.attr("transform", "rotate(-90)")
+.attr("y", 0 - margin.left)
+.attr("x",0 - (height / 2))
+.attr("dy", "1em")
+.style("text-anchor", "middle")
+.text(yLabelTitle);
+
+var point = svg.selectAll(".point")
+.data(points)
+.enter().append("g");
+
+point.append("path")
+.attr("class", "area")
+.attr("d", function(d) { return area(d.values); })
+.style("fill", function(d) { return color(d.name); });
+} else {
+// lines
+var line = d3.svg.line()
+.interpolate("basis")
+.x(function(d) { return x(d.time); })
+.y(function(d) { return y(d.value); });
+
+// create chart
+var svg = d3.select(chartArea).append("svg")
+.attr("id", title)
+.attr("width", width + margin.left + margin.right)
+.attr("height", height + margin.top + margin.bottom)
+.append("g")
+.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+
+color.domain(d3.keys(data[0])
+.filter(function(key) {return $.inArray(key, legends) !== -1; }));
+
+var values = color.domain().map(function(name) {
+return {
+name: name,
+values: data.map(function(d) {
+return {time: d.time, value: +d[name]};
+})
+};
+});
+
+// x & y
+x.domain(d3.extent(data, function(d) { return d.time; }));
+y.domain([
+d3.min(values, function(c) { return 0.9 * d3.min(c.values, function(v) { return v.value; }); }),
+d3.max(values, function(c) { return 1.1 * d3.max(c.values, function(v) { return v.value; }); })
+]);
+
+svg.append("g").attr("class", "x axis")
+.attr("transform", "translate(0," + height + ")")
+.call(xAxis)
+.append("text")
+.attr("transform", "translate(" + (width / 2) + ", 45)")
+.style("text-anchor", "middle")
+.text("Time (s)");
+
+svg.append("g")
+.attr("class", "y axis")
+.call(yAxis)
+.append("text")
+.attr("transform", "rotate(-90)")
+.attr("y", 0 - margin.left)
+.attr("x",0 - (height / 2))
+.attr("dy", "1em")
+.style("text-anchor", "middle")
+.text(yLabelTitle);
+
+var value = svg.selectAll(".city")
+.data(values)
+.enter().append("g")
+.attr("class", "city");
+
+value.append("path")
+.attr("class", "line")
+.attr("d", function(d) { return line(d.values); })
+.style("stroke", function(d) { return color(d.name); });
+}
+// title
+svg.append("text")
+.attr("x", (width / 2))
+.attr("y", 10 - (margin.top / 2))
+.attr("text-anchor", "middle")
+.text(title);
+
+// legend
+var legend = svg.append("g")
+.attr("class", "legend")
+.attr("x", width - 50)
+.attr("y", 25)
+.attr("height", 120)
+.attr("width", 140);
+
+legend.selectAll('g').data(legends)
+.enter()
+.append('g')
+.each(function(d, i) {
+var g = d3.select(this);
+g.append("rect")
+.attr("x", width - 5 - pl)
+.attr("y", i*20 + 0)
+.attr("width", 10)
+.attr("height", 10)
+.style("fill", color(d));
+
+g.append("text")
+.attr("x", width + 15 - pl)
+.attr("y", i * 20 + 8)
+.attr("height",30)
+.attr("width",250)
+.style("fill", color(d))
+.text(d);
+});
+}
+</script>
+</body>
+</html>

+ 278 - 0
hadoop-tools/hadoop-sls/src/main/html/simulate.html.template

@@ -0,0 +1,278 @@
+<html>
+  <head>
+    <meta charset="utf-8">
+      <link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
+      <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
+      <style type="text/css">
+        body '{' font: 20px sans-serif; '}'
+        .axis path,
+        .axis line '{' fill: none; stroke: #000; shape-rendering: crispEdges; '}'
+        .axis text '{' font-family: sans-serif; font-size: 20px; '}'
+        .line '{' fill: none; stroke: steelblue; stroke-width: 3px; '}'
+        .legend '{'
+          padding: 5px;
+          font: 18px sans-serif;
+          background: yellow;
+          box-shadow: 2px 2px 1px #888;
+        '}'
+        .title '{' font: 24px sans-serif; '}'
+        .divborder '{'
+          border-width: 1px;
+          border-style: solid;
+          border-color: black;
+          margin-top:10px
+        '}'
+      </style>
+      <script src="js/thirdparty/d3.v3.js"></script>
+      <script src="js/thirdparty/jquery.js"></script>
+      <script src="js/thirdparty/bootstrap.min.js"></script>
+    </head>
+  <body>
+    <div class="row">
+      <div class="span10 offset2"><br>
+        <input type="button" style="float: right;" value="Stop"
+               onClick="stop()" />
+      </div>
+    </div>
+    <div class="row">
+      <div class="divborder span8" style="margin-left:50px" id="area1"></div>
+      <div class="divborder span8" id="area2"></div>
+    </div>
+    <div class="row">
+      <div class="divborder span8" style="margin-left:50px" id="area3"></div>
+      <div class="divborder span8" id="area4"></div>
+    </div>
+    <div class="row">
+      <div class="divborder span8" style="margin-left:50px" id="area5"></div>
+      <div class="divborder span8" id="area6"></div>
+    </div>
+    <div class="row">
+      <div class="divborder span8" style="margin-left:50px" id="area7"></div>
+      <div class="span8" id="area8"></div>
+    </div><br/><br/>
+
+    <script>
+      var basetime = 0;
+      var running = 1;
+      var data = [];
+      var width, height;
+      var legends = [];
+      var titles = [];
+      var yLabels = [];
+      var isAreas = [];
+      var svgs = [];
+      var xs = [];
+      var ys = [];
+      var xAxiss = [];
+      var yAxiss = [];
+      var lineAreas = [];
+      var stacks = [];
+
+      // legends
+      legends[0] = [''running.applications'', ''running.containers''];
+      legends[1] = [''jvm.free.memory'', ''jvm.max.memory'', ''jvm.total.memory''];
+      legends[2] = [''cluster.allocated.memory'', ''cluster.available.memory''];
+      legends[3] = [''cluster.allocated.vcores'', ''cluster.available.vcores''];
+      legends[4] = [];
+      legends[5] = [];
+      {0}
+      legends[6] = [''scheduler.allocate.timecost'',
+                    ''scheduler.handle-NODE_ADDED.timecost'',
+                    ''scheduler.handle-NODE_REMOVED.timecost'',
+                    ''scheduler.handle-NODE_UPDATE.timecost'',
+                    ''scheduler.handle-APP_ADDED.timecost'',
+                    ''scheduler.handle-APP_REMOVED.timecost'',
+                    ''scheduler.handle-CONTAINER_EXPIRED.timecost''];
+
+      // title
+      titles[0] = ''Cluster running applications & containers'';
+      titles[1] = ''JVM memory'';
+      titles[2] = ''Cluster allocated & available memory'';
+      titles[3] = ''Cluster allocated & available vcores'';
+      titles[4] = ''Queue allocated memory'';
+      titles[5] = ''Queue allocated vcores'';
+      titles[6] = ''Scheduler allocate & handle operation timecost'';
+
+      // ylabels
+      yLabels[0] = ''Number'';
+      yLabels[1] = ''Memory (GB)'';
+      yLabels[2] = ''Memory (GB)'';
+      yLabels[3] = ''Number'';
+      yLabels[4] = ''Memory (GB)'';
+      yLabels[5] = ''Number'';
+      yLabels[6] = ''Timecost (ms)'';
+
+      // is area?
+      isAreas = [0, 0, 0, 0, 1, 1, 0];
+
+      // draw all charts
+      for (var i = 0; i < 7; i ++) '{'
+        drawEachChart(i);
+      '}'
+
+      // draw each chart
+      function drawEachChart(index) '{'
+        var margin = '{'top: 50, right: 250, bottom: 50, left: 70'}';
+        width = 750 - margin.left - margin.right;
+        height = 420 - margin.top - margin.bottom;
+
+      xs[index] = d3.scale.linear().range([0, width]);
+      ys[index] = d3.scale.linear().range([height, 0]);
+      xAxiss[index] = d3.svg.axis().scale(xs[index]).orient(''bottom'');
+      yAxiss[index] = d3.svg.axis().scale(ys[index]).orient(''left'');
+
+      if (isAreas[index] == 1)'{'
+        lineAreas[index] = d3.svg.area()
+                            .x(function(d) '{' return xs[index](d.time); '}')
+                            .y0(function(d) '{' return ys[index](d.y0); '}')
+                            .y1(function(d) '{' return ys[index](d.y0 + d.y); '}');
+
+        stacks[index] = d3.layout.stack()
+                          .values(function(d) '{' return d.values; '}');
+      '}' else '{'
+        lineAreas[index] = d3.svg.line()
+                            .interpolate(''basis'')
+                            .x(function(d) '{' return xs[index](d.time); '}')
+                            .y(function(d) '{' return ys[index](d.value); '}');
+      '}'
+
+      svgs[index] = d3.select(''#area'' + (index + 1)).append(''svg'')
+        .attr(''width'', width + margin.left + margin.right)
+        .attr(''height'', height + margin.top + margin.bottom)
+        .append(''g'')
+        .attr(''transform'', ''translate('' + margin.left + '','' + margin.top + '')'');
+
+      // x, y and title
+      svgs[index].append(''text'')
+        .attr(''transform'', ''translate('' + (width / 2) + '' ,'' +
+              (height + margin.bottom - 10 ) + '')'')
+        .style(''text-anchor'', ''middle'')
+        .text(''Time ({1})'');
+
+      svgs[index].append(''text'')
+        .attr(''transform'', ''rotate(-90)'')
+        .attr(''y'', 0 - margin.left)
+        .attr(''x'',0 - (height / 2))
+        .attr(''dy'', ''1em'')
+        .style(''text-anchor'', ''middle'')
+        .text(yLabels[index]);
+
+      svgs[index].append(''text'')
+        .attr(''x'', (width / 2))
+        .attr(''y'', 10 - (margin.top / 2))
+        .attr(''text-anchor'', ''middle'')
+        .text(titles[index]);
+    '}'
+
+    // request data
+    function requestData() '{'
+      $.ajax('{'url: ''simulateMetrics'',
+        success: function(point) '{'
+          // update data
+          if (basetime == 0)  basetime = point.time;
+          point.time = (point.time - basetime) / {2};
+          data.push(point);
+
+          // clear old
+          for (var i = 0; i < 7; i ++) '{'
+            svgs[i].selectAll(''g.tick'').remove();
+            svgs[i].selectAll(''g'').remove();
+            var color = d3.scale.category10();
+            color.domain(d3.keys(data[0]).filter(function(key) '{'
+              return $.inArray(key, legends[i]) !== -1;
+            '}'));
+
+            var values;
+            if (isAreas[i] == 1) '{'
+              values = stacks[i](color.domain().map(function(name) '{'
+                return '{'
+                  name: name,
+                  values: data.map(function(d) '{'
+                    return '{'time: d.time, y: d[name]'}';
+                  '}')
+                '}'
+              '}'));
+              xs[i].domain(d3.extent(data, function(d) '{' return d.time;'}'));
+              ys[i].domain([
+                d3.min(values, function(c) '{' return 0; '}'),
+                d3.max(values, function(c) '{' return 1.1 * d3.max(c.values,
+                                        function(v) '{' return v.y + v.y0; '}'); '}')
+              ]);
+            '}' else '{'
+              values = color.domain().map(function(name) '{'
+                return '{'
+                  name: name,
+                  values: data.map(function(d) '{'
+                    return '{'time: d.time, value: d[name]'}';
+                  '}')
+                '}'
+              '}');
+              xs[i].domain(d3.extent(data, function(d) '{' return d.time;'}'));
+              ys[i].domain([
+                d3.min(values, function(c) '{' return 0; '}'),
+                d3.max(values, function(c) '{' return 1.1 * d3.max(c.values,
+                                        function(v) '{' return v.value; '}'); '}')
+              ]);
+            '}'
+
+            svgs[i].append(''g'').attr(''class'', ''x axis'')
+              .attr(''transform'', ''translate(0,'' + height + '')'').call(xAxiss[i]);
+
+            svgs[i].append(''g'').attr(''class'', ''y axis'').call(yAxiss[i]);
+
+            var value = svgs[i].selectAll(''.path'')
+              .data(values).enter().append(''g'').attr(''class'', ''line'');
+
+            if(isAreas[i] == 1) '{'
+              value.append(''path'').attr(''class'', ''area'')
+                    .attr(''d'', function(d) '{'return lineAreas[i](d.values); '}')
+                    .style(''fill'', function(d) '{'return color(d.name); '}');
+            '}' else '{'
+              value.append(''path'').attr(''class'', ''line'')
+                    .attr(''d'', function(d) '{'return lineAreas[i](d.values); '}')
+                    .style(''stroke'', function(d) '{'return color(d.name); '}');
+            '}'
+
+            // legend
+            var legend = svgs[i].append(''g'')
+              .attr(''class'', ''legend'')
+              .attr(''x'', width + 5)
+              .attr(''y'', 25)
+              .attr(''height'', 120)
+              .attr(''width'', 140);
+            legend.selectAll(''g'').data(legends[i])
+              .enter()
+              .append(''g'')
+              .each(function(d, i) '{'
+                var g = d3.select(this);
+                g.append(''rect'')
+                  .attr(''x'', width + 5)
+                  .attr(''y'', i*20)
+                  .attr(''width'', 10)
+                  .attr(''height'', 10)
+                  .style(''fill'', color(d));
+                g.append(''text'')
+                  .attr(''x'', width + 25)
+                  .attr(''y'', i * 20 + 8)
+                  .attr(''height'',30)
+                  .attr(''width'',250)
+                  .style(''fill'', color(d))
+                  .text(d);
+              '}');
+            '}'
+
+            if(running == 1)
+              setTimeout(requestData, {3});
+          '}',
+          cache: false
+        '}');
+      '}'
+
+      // stop
+      function stop() '{'
+        running = 0;
+      '}'
+      requestData();
+    </script>
+  </body>
+</html>

+ 50 - 0
hadoop-tools/hadoop-sls/src/main/html/simulate.info.html.template

@@ -0,0 +1,50 @@
+<html>
+  <head>
+    <meta charset="utf-8">
+    <style type="text/css">
+      .td1 '{'
+        border-width: 1px;
+        padding: 8px;
+        border-style: solid;
+        border-color: #666666;
+        background-color: #dedede;
+        width: 50%;
+      '}'
+      table.gridtable '{'
+        font-family: verdana,arial,sans-serif;
+        font-size:11px;
+        color:#333333;
+        border-width: 1px;
+        border-color: #666666;
+        border-collapse: collapse;
+        margin-top: 80px;
+      '}'
+      .td2 '{'
+        border-width: 1px;
+        padding: 8px;
+        border-style: solid;
+        border-color: #666666;
+        background-color: #ffffff;
+        width: 50%;
+      '}'
+    </style>
+  </head>
+  <body>
+    <table class="gridtable" align="center" width="400px">
+      <tr>
+        <td colspan="2" class="td2" align="center">
+          <b>SLS Simulate Information</b>
+        </td>
+      </tr>
+      {0}
+      <tr>
+        <td align="center" height="80px">
+          <a href="simulate">Simulation Charts</a>
+        </td>
+        <td align="center">
+          <a href="track">Tracked Jobs & Queues</a>
+        </td>
+      </tr>
+    </table>
+  </body>
+</html>

+ 193 - 0
hadoop-tools/hadoop-sls/src/main/html/track.html.template

@@ -0,0 +1,193 @@
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
+    <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
+    <style type="text/css">
+      body '{' font: 20px sans-serif;'}'
+      .axis path,
+      .axis line '{' fill: none; stroke: #000; shape-rendering: crispEdges;'}'
+      .axis text '{' font-family: sans-serif; font-size: 20px; '}'
+      .line '{' fill: none; stroke: steelblue; stroke-width: 3px; '}'
+      .legend '{' padding: 5px; font: 18px sans-serif; background: yellow;
+                box-shadow: 2px 2px 1px #888;'}'
+      .title '{' font: 24px sans-serif; '}'
+      .divborder '{' border-width: 1px; border-style: solid; border-color: black;
+                    margin-top:10px '}'
+    </style>
+    <script src="js/thirdparty/d3.v3.js"></script>
+    <script src="js/thirdparty/jquery.js"></script>
+    <script src="js/thirdparty/bootstrap.min.js"></script>
+  </head>
+  <body>
+    <div class="row">
+      <div class="offset4 span8"><br/><br/><br/>
+        Select Tracked Job/Queue:
+        <select id="trackedSelect" onchange="redrawChart()">
+          <option>----Queue----</option>
+          {0}
+          <option>----Job----</option>
+          {1}
+        </select>
+        <input type="button" style="float: right;" value="Stop"
+               onClick="stop()" />
+      </div>
+    </div>
+    <div class="row">
+      <div class="divborder span9 offset4" id="area1"></div>
+    </div>
+    <script>
+      // global variables
+      var basetime = 0;
+      var running = 1;
+      var para = '''';
+      var data = [];
+      var path, line, svg;
+      var x, y;
+      var width, height;
+      var xAxis, yAxis;
+      var legends = [''usage.memory'', ''demand.memory'', ''maxshare.memory'',
+                      ''minshare.memory'', ''fairshare.memory''];
+
+      // stop function
+      function stop() '{'
+        running = 0;
+      '}'
+
+      // select changed event
+      function redrawChart() '{'
+        var value = $(''#trackedSelect'').val();
+        if (value.substring(0, ''Job ''.length) === ''Job ''
+                      || value.substring(0, ''Queue ''.length) === ''Queue '') '{'
+          para = value;
+          running = 0;
+          basetime = 0;
+          data = [];
+          $(''#area1'').empty();
+          drawChart(''Tracking '' + value);
+          running = 1;
+          requestData();
+        }
+      }
+
+      // draw chart
+      function drawChart(title) '{'
+        // location
+        var margin = '{'top: 50, right: 150, bottom: 50, left: 80'}';
+        width = 800 - margin.left - margin.right;
+        height = 420 - margin.top - margin.bottom;
+        x = d3.scale.linear().range([0, width]);
+        y = d3.scale.linear().range([height, 0]);
+        xAxis = d3.svg.axis().scale(x).orient(''bottom'');
+        yAxis = d3.svg.axis().scale(y).orient(''left'');
+        // lines
+        line = d3.svg.line().interpolate(''basis'')
+                .x(function(d) '{' return x(d.time); })
+                .y(function(d) '{' return y(d.value); });
+        // create chart
+        svg = d3.select(''#area1'').append(''svg'')
+                .attr(''width'', width + margin.left + margin.right)
+                .attr(''height'', height + margin.top + margin.bottom)
+                .append(''g'')
+                .attr(''transform'', ''translate('' + margin.left + '','' + margin.top + '')'');
+        // axis labels
+        svg.append(''text'')
+                .attr(''transform'', ''translate('' + (width / 2) + '','' + (height + margin.bottom - 5 ) + '')'')
+                .style(''text-anchor'', ''middle'')
+                .text(''Time ({2})'');
+        svg.append(''text'')
+                .attr(''transform'', ''rotate(-90)'')
+                .attr(''y'', 0 - margin.left)
+                .attr(''x'',0 - (height / 2))
+                .attr(''dy'', ''1em'')
+                .style(''text-anchor'', ''middle'')
+                .text(''Memory (GB)'');
+        // title
+        svg.append(''text'')
+                .attr(''x'', (width / 2))
+                .attr(''y'', 10 - (margin.top / 2))
+                .attr(''text-anchor'', ''middle'')
+                .text(title);
+      '}'
+
+      // request data
+      function requestData() '{'
+        $.ajax('{'url: ''trackMetrics?t='' + para,
+          success: function(point) '{'
+            // clear old
+            svg.selectAll(''g.tick'').remove();
+            svg.selectAll(''g'').remove();
+
+          if(basetime == 0)  basetime = point.time;
+          point.time = (point.time - basetime)/{3};
+          data.push(point);
+
+          var color = d3.scale.category10();
+          color.domain(d3.keys(data[0]).filter(function(key) '{'
+            return $.inArray(key, legends) !== -1;
+          '}'));
+
+          var values = color.domain().map(function(name) '{'
+            return '{'
+              name: name,
+              values: data.map(function(d) '{'
+                return '{' time: d.time, value: d[name]'}';
+              '}')
+            '}';
+          '}');
+
+          // set x/y range
+          x.domain(d3.extent(data, function(d) '{' return d.time; '}'));
+          y.domain([
+            d3.min(values, function(c) '{' return 0 '}'),
+            d3.max(values, function(c) '{' return 1.1 * d3.max(c.values, function(v) '{' return v.value; '}'); '}')
+          ]);
+
+          svg.append(''g'').attr(''class'', ''x axis'')
+            .attr(''transform'', ''translate(0,'' + height + '')'').call(xAxis);
+          svg.append(''g'').attr(''class'', ''y axis'').call(yAxis);
+          var value = svg.selectAll(''.path'')
+            .data(values).enter().append(''g'').attr(''class'', ''line'');
+
+          value.append(''path'').attr(''class'', ''line'')
+            .attr(''d'', function(d) '{'return line(d.values); '}')
+            .style(''stroke'', function(d) '{'return color(d.name); '}');
+
+          // legend
+          var legend = svg.append(''g'')
+            .attr(''class'', ''legend'')
+            .attr(''x'', width + 5)
+            .attr(''y'', 25)
+            .attr(''height'', 120)
+            .attr(''width'', 180);
+
+          legend.selectAll(''g'').data(legends)
+            .enter()
+            .append(''g'')
+            .each(function(d, i) '{'
+              var g = d3.select(this);
+              g.append(''rect'')
+                .attr(''x'', width + 5)
+                .attr(''y'', i * 20)
+                .attr(''width'', 10)
+                .attr(''height'', 10)
+                .style(''fill'', color(d));
+
+              g.append(''text'')
+                .attr(''x'', width + 25)
+                .attr(''y'', i * 20 + 8)
+                .attr(''height'',30)
+                .attr(''width'',250)
+                .style(''fill'', color(d))
+                .text(d);
+            '}');
+
+          if(running == 1)
+            setTimeout(requestData, {4});
+        '}',
+        cache: false
+      '}');
+    '}'
+  </script>
+</body>
+</html>

+ 234 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/RumenToSLSConverter.java

@@ -0,0 +1,234 @@
+/**
+ * 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.
+ */
+package org.apache.hadoop.yarn.sls;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.GnuParser;
+import org.apache.commons.cli.Options;
+import org.codehaus.jackson.JsonFactory;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.ObjectWriter;
+
+import org.apache.hadoop.yarn.sls.utils.SLSUtils;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+public class RumenToSLSConverter {
+  private static final String EOL = System.getProperty("line.separator");
+
+  private static long baseline = 0;
+  private static Map<String, Set<String>> rackNodeMap =
+          new TreeMap<String, Set<String>>();
+
+  public static void main(String args[]) throws Exception {
+    Options options = new Options();
+    options.addOption("input", true, "input rumen json file");
+    options.addOption("outputJobs", true, "output jobs file");
+    options.addOption("outputNodes", true, "output nodes file");
+
+    CommandLineParser parser = new GnuParser();
+    CommandLine cmd = parser.parse(options, args);
+
+    if (! cmd.hasOption("input") ||
+            ! cmd.hasOption("outputJobs") ||
+            ! cmd.hasOption("outputNodes")) {
+      System.err.println();
+      System.err.println("ERROR: Missing input or output file");
+      System.err.println();
+      System.err.println("LoadGenerator creates a SLS script " +
+              "from a Hadoop Rumen output");
+      System.err.println();
+      System.err.println("Options: -input FILE -outputJobs FILE " +
+              "-outputNodes FILE");
+      System.err.println();
+      System.exit(1);
+    }
+
+    String inputFile = cmd.getOptionValue("input");
+    String outputJsonFile = cmd.getOptionValue("outputJobs");
+    String outputNodeFile = cmd.getOptionValue("outputNodes");
+
+    // check existing
+    if (! new File(inputFile).exists()) {
+      System.err.println();
+      System.err.println("ERROR: input does not exist");
+      System.exit(1);
+    }
+    if (new File(outputJsonFile).exists()) {
+      System.err.println();
+      System.err.println("ERROR: output job file is existing");
+      System.exit(1);
+    }
+    if (new File(outputNodeFile).exists()) {
+      System.err.println();
+      System.err.println("ERROR: output node file is existing");
+      System.exit(1);
+    }
+
+    File jsonFile = new File(outputJsonFile);
+    if (! jsonFile.getParentFile().exists()
+            && ! jsonFile.getParentFile().mkdirs()) {
+      System.err.println("ERROR: Cannot create output directory in path: "
+              + jsonFile.getParentFile().getAbsoluteFile());
+      System.exit(1);
+    }
+    File nodeFile = new File(outputNodeFile);
+    if (! nodeFile.getParentFile().exists()
+            && ! nodeFile.getParentFile().mkdirs()) {
+      System.err.println("ERROR: Cannot create output directory in path: "
+              + jsonFile.getParentFile().getAbsoluteFile());
+      System.exit(1);
+    }
+
+    generateSLSLoadFile(inputFile, outputJsonFile);
+    generateSLSNodeFile(outputNodeFile);
+  }
+
+  private static void generateSLSLoadFile(String inputFile, String outputFile)
+          throws IOException {
+    Reader input = new FileReader(inputFile);
+    try {
+      Writer output = new FileWriter(outputFile);
+      try {
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectWriter writer = mapper.defaultPrettyPrintingWriter();
+        Iterator<Map> i = mapper.readValues(
+                new JsonFactory().createJsonParser(input), Map.class);
+        while (i.hasNext()) {
+          Map m = i.next();
+          output.write(writer.writeValueAsString(createSLSJob(m)) + EOL);
+        }
+      } finally {
+        output.close();
+      }
+    } finally {
+      input.close();
+    }
+  }
+
+  @SuppressWarnings("unchecked")
+  private static void generateSLSNodeFile(String outputFile)
+          throws IOException {
+    Writer output = new FileWriter(outputFile);
+    try {
+      ObjectMapper mapper = new ObjectMapper();
+      ObjectWriter writer = mapper.defaultPrettyPrintingWriter();
+      for (Map.Entry<String, Set<String>> entry : rackNodeMap.entrySet()) {
+        Map rack = new LinkedHashMap();
+        rack.put("rack", entry.getKey());
+        List nodes = new ArrayList();
+        for (String name : entry.getValue()) {
+          Map node = new LinkedHashMap();
+          node.put("node", name);
+          nodes.add(node);
+        }
+        rack.put("nodes", nodes);
+        output.write(writer.writeValueAsString(rack) + EOL);
+      }
+    } finally {
+      output.close();
+    }
+  }
+
+  @SuppressWarnings("unchecked")
+  private static Map createSLSJob(Map rumenJob) {
+    Map json = new LinkedHashMap();
+    long jobStart = (Long) rumenJob.get("submitTime");
+    long jobFinish = (Long) rumenJob.get("finishTime");
+    String jobId = rumenJob.get("jobID").toString();
+    String queue = rumenJob.get("queue").toString();
+    String user = rumenJob.get("user").toString();
+    if (baseline == 0) {
+      baseline = jobStart;
+    }
+    jobStart -= baseline;
+    jobFinish -= baseline;
+    long offset = 0;
+    if (jobStart < 0) {
+      System.out.println("Warning: reset job " + jobId + " start time to 0.");
+      offset = -jobStart;
+      jobFinish = jobFinish - jobStart;
+      jobStart = 0;
+    }
+
+    json.put("am.type", "mapreduce");
+    json.put("job.start.ms", jobStart);
+    json.put("job.end.ms", jobFinish);
+    json.put("job.queue.name", queue);
+    json.put("job.id", jobId);
+    json.put("job.user", user);
+
+    List maps = createSLSTasks("map",
+            (List) rumenJob.get("mapTasks"), offset);
+    List reduces = createSLSTasks("reduce",
+            (List) rumenJob.get("reduceTasks"), offset);
+    List tasks = new ArrayList();
+    tasks.addAll(maps);
+    tasks.addAll(reduces);
+    json.put("job.tasks", tasks);
+    return json;
+  }
+
+  @SuppressWarnings("unchecked")
+  private static List createSLSTasks(String taskType,
+                                     List rumenTasks, long offset) {
+    int priority = taskType.equals("reduce") ? 10 : 20;
+    List array = new ArrayList();
+    for (Object e : rumenTasks) {
+      Map rumenTask = (Map) e;
+      for (Object ee : (List) rumenTask.get("attempts"))  {
+        Map rumenAttempt = (Map) ee;
+        long taskStart = (Long) rumenAttempt.get("startTime");
+        long taskFinish = (Long) rumenAttempt.get("finishTime");
+        String hostname = (String) rumenAttempt.get("hostName");
+        taskStart = taskStart - baseline + offset;
+        taskFinish = taskFinish - baseline + offset;
+        Map task = new LinkedHashMap();
+        task.put("container.host", hostname);
+        task.put("container.start.ms", taskStart);
+        task.put("container.end.ms", taskFinish);
+        task.put("container.priority", priority);
+        task.put("container.type", taskType);
+        array.add(task);
+        String rackHost[] = SLSUtils.getRackHostName(hostname);
+        if (rackNodeMap.containsKey(rackHost[0])) {
+          rackNodeMap.get(rackHost[0]).add(rackHost[1]);
+        } else {
+          Set<String> hosts = new TreeSet<String>();
+          hosts.add(rackHost[1]);
+          rackNodeMap.put(rackHost[0], hosts);
+        }
+      }
+    }
+    return array;
+  }
+}

+ 526 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java

@@ -0,0 +1,526 @@
+/**
+ * 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.
+ */
+package org.apache.hadoop.yarn.sls;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.text.MessageFormat;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Random;
+import java.util.Arrays;
+
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.tools.rumen.JobTraceReader;
+import org.apache.hadoop.tools.rumen.LoggedJob;
+import org.apache.hadoop.tools.rumen.LoggedTask;
+import org.apache.hadoop.tools.rumen.LoggedTaskAttempt;
+import org.apache.hadoop.yarn.api.records.NodeState;
+import org.apache.hadoop.yarn.api.records.Resource;
+import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
+import org.apache.hadoop.yarn.sls.appmaster.AMSimulator;
+import org.apache.hadoop.yarn.sls.conf.SLSConfiguration;
+import org.apache.hadoop.yarn.sls.nodemanager.NMSimulator;
+import org.apache.hadoop.yarn.sls.scheduler.ContainerSimulator;
+import org.apache.hadoop.yarn.sls.scheduler.ResourceSchedulerWrapper;
+import org.apache.hadoop.yarn.sls.scheduler.TaskRunner;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.GnuParser;
+import org.apache.commons.cli.Options;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.util.ReflectionUtils;
+import org.apache.hadoop.yarn.api.records.NodeId;
+import org.apache.hadoop.yarn.conf.YarnConfiguration;
+import org.apache.hadoop.yarn.exceptions.YarnException;
+import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
+import org.apache.hadoop.yarn.server.utils.BuilderUtils;
+import org.apache.hadoop.yarn.sls.utils.SLSUtils;
+import org.apache.log4j.Logger;
+import org.codehaus.jackson.JsonFactory;
+import org.codehaus.jackson.map.ObjectMapper;
+
+public class SLSRunner {
+  // RM, Runner
+  private ResourceManager rm;
+  private static TaskRunner runner = new TaskRunner();
+  private String[] inputTraces;
+  private Configuration conf;
+  private Map<String, Integer> queueAppNumMap;
+  
+  // NM simulator
+  private HashMap<NodeId, NMSimulator> nmMap;
+  private int nmMemoryMB, nmVCores;
+  private String nodeFile;
+  
+  // AM simulator
+  private int AM_ID;
+  private Map<String, AMSimulator> amMap;
+  private Set<String> trackedApps;
+  private Map<String, Class> amClassMap;
+  private static int remainingApps = 0;
+
+  // metrics
+  private String metricsOutputDir;
+  private boolean printSimulation;
+
+  // other simulation information
+  private int numNMs, numRacks, numAMs, numTasks;
+  private long maxRuntime;
+  public final static Map<String, Object> simulateInfoMap =
+          new HashMap<String, Object>();
+
+  // logger
+  public final static Logger LOG = Logger.getLogger(SLSRunner.class);
+
+  // input traces, input-rumen or input-sls
+  private boolean isSLS;
+  
+  public SLSRunner(boolean isSLS, String inputTraces[], String nodeFile,
+                   String outputDir, Set<String> trackedApps,
+                   boolean printsimulation)
+          throws IOException, ClassNotFoundException {
+    this.isSLS = isSLS;
+    this.inputTraces = inputTraces.clone();
+    this.nodeFile = nodeFile;
+    this.trackedApps = trackedApps;
+    this.printSimulation = printsimulation;
+    metricsOutputDir = outputDir;
+    
+    nmMap = new HashMap<NodeId, NMSimulator>();
+    queueAppNumMap = new HashMap<String, Integer>();
+    amMap = new HashMap<String, AMSimulator>();
+    amClassMap = new HashMap<String, Class>();
+    
+    // runner configuration
+    conf = new Configuration(false);
+    conf.addResource("sls-runner.xml");
+    // runner
+    int poolSize = conf.getInt(SLSConfiguration.RUNNER_POOL_SIZE, 
+                                SLSConfiguration.RUNNER_POOL_SIZE_DEFAULT); 
+    SLSRunner.runner.setQueueSize(poolSize);
+    // <AMType, Class> map
+    for (Map.Entry e : conf) {
+      String key = e.getKey().toString();
+      if (key.startsWith(SLSConfiguration.AM_TYPE)) {
+        String amType = key.substring(SLSConfiguration.AM_TYPE.length());
+        amClassMap.put(amType, Class.forName(conf.get(key)));
+      }
+    }
+  }
+  
+  public void start() throws Exception {
+    // start resource manager
+    startRM();
+    // start node managers
+    startNM();
+    // start application masters
+    startAM();
+    // set queue & tracked apps information
+    ((ResourceSchedulerWrapper) rm.getResourceScheduler())
+                            .setQueueSet(this.queueAppNumMap.keySet());
+    ((ResourceSchedulerWrapper) rm.getResourceScheduler())
+                            .setTrackedAppSet(this.trackedApps);
+    // print out simulation info
+    printSimulationInfo();
+    // blocked until all nodes RUNNING
+    waitForNodesRunning();
+    // starting the runner once everything is ready to go,
+    runner.start();
+  }
+  
+  private void startRM() throws IOException, ClassNotFoundException {
+    Configuration rmConf = new YarnConfiguration();
+    String schedulerClass = rmConf.get(YarnConfiguration.RM_SCHEDULER);
+    rmConf.set(SLSConfiguration.RM_SCHEDULER, schedulerClass);
+    rmConf.set(YarnConfiguration.RM_SCHEDULER,
+            ResourceSchedulerWrapper.class.getName());
+    rmConf.set(SLSConfiguration.METRICS_OUTPUT_DIR, metricsOutputDir);
+    rm = new ResourceManager();
+    rm.init(rmConf);
+    rm.start();
+  }
+
+  private void startNM() throws YarnException, IOException {
+    // nm configuration
+    nmMemoryMB = conf.getInt(SLSConfiguration.NM_MEMORY_MB,
+            SLSConfiguration.NM_MEMORY_MB_DEFAULT);
+    nmVCores = conf.getInt(SLSConfiguration.NM_VCORES,
+            SLSConfiguration.NM_VCORES_DEFAULT);
+    int heartbeatInterval = conf.getInt(
+            SLSConfiguration.NM_HEARTBEAT_INTERVAL_MS,
+            SLSConfiguration.NM_HEARTBEAT_INTERVAL_MS_DEFAULT);
+    // nm information (fetch from topology file, or from sls/rumen json file)
+    Set<String> nodeSet = new HashSet<String>();
+    if (nodeFile.isEmpty()) {
+      if (isSLS) {
+        for (String inputTrace : inputTraces) {
+          nodeSet.addAll(SLSUtils.parseNodesFromSLSTrace(inputTrace));
+        }
+      } else {
+        for (String inputTrace : inputTraces) {
+          nodeSet.addAll(SLSUtils.parseNodesFromRumenTrace(inputTrace));
+        }
+      }
+
+    } else {
+      nodeSet.addAll(SLSUtils.parseNodesFromNodeFile(nodeFile));
+    }
+    // create NM simulators
+    Random random = new Random();
+    Set<String> rackSet = new HashSet<String>();
+    for (String hostName : nodeSet) {
+      // we randomize the heartbeat start time from zero to 1 interval
+      NMSimulator nm = new NMSimulator();
+      nm.init(hostName, nmMemoryMB, nmVCores, 
+          random.nextInt(heartbeatInterval), heartbeatInterval, rm);
+      nmMap.put(nm.getNode().getNodeID(), nm);
+      runner.schedule(nm);
+      rackSet.add(nm.getNode().getRackName());
+    }
+    numRacks = rackSet.size();
+    numNMs = nmMap.size();
+  }
+
+  private void waitForNodesRunning() throws InterruptedException {
+    long startTimeMS = System.currentTimeMillis();
+    while (true) {
+      int numRunningNodes = 0;
+      for (RMNode node : rm.getRMContext().getRMNodes().values()) {
+        if (node.getState() == NodeState.RUNNING) {
+          numRunningNodes ++;
+        }
+      }
+      if (numRunningNodes == numNMs) {
+        break;
+      }
+      LOG.info(MessageFormat.format("SLSRunner is waiting for all " +
+              "nodes RUNNING. {0} of {1} NMs initialized.",
+              numRunningNodes, numNMs));
+      Thread.sleep(1000);
+    }
+    LOG.info(MessageFormat.format("SLSRunner takes {0} ms to launch all nodes.",
+            (System.currentTimeMillis() - startTimeMS)));
+  }
+
+  @SuppressWarnings("unchecked")
+  private void startAM() throws YarnException, IOException {
+    // application/container configuration
+    int heartbeatInterval = conf.getInt(
+            SLSConfiguration.AM_HEARTBEAT_INTERVAL_MS,
+            SLSConfiguration.AM_HEARTBEAT_INTERVAL_MS_DEFAULT);
+    int containerMemoryMB = conf.getInt(SLSConfiguration.CONTAINER_MEMORY_MB,
+            SLSConfiguration.CONTAINER_MEMORY_MB_DEFAULT);
+    int containerVCores = conf.getInt(SLSConfiguration.CONTAINER_VCORES,
+            SLSConfiguration.CONTAINER_VCORES_DEFAULT);
+    Resource containerResource =
+            BuilderUtils.newResource(containerMemoryMB, containerVCores);
+
+    // application workload
+    if (isSLS) {
+      startAMFromSLSTraces(containerResource, heartbeatInterval);
+    } else {
+      startAMFromRumenTraces(containerResource, heartbeatInterval);
+    }
+    numAMs = amMap.size();
+    remainingApps = numAMs;
+  }
+
+  /**
+   * parse workload information from sls trace files
+   */
+  @SuppressWarnings("unchecked")
+  private void startAMFromSLSTraces(Resource containerResource,
+                                    int heartbeatInterval) throws IOException {
+    // parse from sls traces
+    JsonFactory jsonF = new JsonFactory();
+    ObjectMapper mapper = new ObjectMapper();
+    for (String inputTrace : inputTraces) {
+      Reader input = new FileReader(inputTrace);
+      try {
+        Iterator<Map> i = mapper.readValues(jsonF.createJsonParser(input),
+                Map.class);
+        while (i.hasNext()) {
+          Map jsonJob = i.next();
+
+          // load job information
+          long jobStartTime = Long.parseLong(
+                  jsonJob.get("job.start.ms").toString());
+          long jobFinishTime = Long.parseLong(
+                  jsonJob.get("job.end.ms").toString());
+
+          String user = (String) jsonJob.get("job.user");
+          if (user == null)  user = "default";
+          String queue = jsonJob.get("job.queue.name").toString();
+
+          String oldAppId = jsonJob.get("job.id").toString();
+          boolean isTracked = trackedApps.contains(oldAppId);
+          int queueSize = queueAppNumMap.containsKey(queue) ?
+                  queueAppNumMap.get(queue) : 0;
+          queueSize ++;
+          queueAppNumMap.put(queue, queueSize);
+          // tasks
+          List tasks = (List) jsonJob.get("job.tasks");
+          if (tasks == null || tasks.size() == 0) {
+            continue;
+          }
+          List<ContainerSimulator> containerList =
+                  new ArrayList<ContainerSimulator>();
+          for (Object o : tasks) {
+            Map jsonTask = (Map) o;
+            String hostname = jsonTask.get("container.host").toString();
+            long taskStart = Long.parseLong(
+                    jsonTask.get("container.start.ms").toString());
+            long taskFinish = Long.parseLong(
+                    jsonTask.get("container.end.ms").toString());
+            long lifeTime = taskFinish - taskStart;
+            int priority = Integer.parseInt(
+                    jsonTask.get("container.priority").toString());
+            String type = jsonTask.get("container.type").toString();
+            containerList.add(new ContainerSimulator(containerResource,
+                    lifeTime, hostname, priority, type));
+          }
+
+          // create a new AM
+          String amType = jsonJob.get("am.type").toString();
+          AMSimulator amSim = (AMSimulator) ReflectionUtils.newInstance(
+                  amClassMap.get(amType), new Configuration());
+          if (amSim != null) {
+            amSim.init(AM_ID++, heartbeatInterval, containerList, rm,
+                    this, jobStartTime, jobFinishTime, user, queue,
+                    isTracked, oldAppId);
+            runner.schedule(amSim);
+            maxRuntime = Math.max(maxRuntime, jobFinishTime);
+            numTasks += containerList.size();
+            amMap.put(oldAppId, amSim);
+          }
+        }
+      } finally {
+        input.close();
+      }
+    }
+  }
+
+  /**
+   * parse workload information from rumen trace files
+   */
+  @SuppressWarnings("unchecked")
+  private void startAMFromRumenTraces(Resource containerResource,
+                                      int heartbeatInterval)
+          throws IOException {
+    Configuration conf = new Configuration();
+    conf.set("fs.defaultFS", "file:///");
+    long baselineTimeMS = 0;
+    for (String inputTrace : inputTraces) {
+      File fin = new File(inputTrace);
+      JobTraceReader reader = new JobTraceReader(
+              new Path(fin.getAbsolutePath()), conf);
+      try {
+        LoggedJob job = null;
+        while ((job = reader.getNext()) != null) {
+          // only support MapReduce currently
+          String jobType = "mapreduce";
+          String user = job.getUser() == null ?
+                  "default" : job.getUser().getValue();
+          String jobQueue = job.getQueue().getValue();
+          String oldJobId = job.getJobID().toString();
+          long jobStartTimeMS = job.getSubmitTime();
+          long jobFinishTimeMS = job.getFinishTime();
+          if (baselineTimeMS == 0) {
+            baselineTimeMS = jobStartTimeMS;
+          }
+          jobStartTimeMS -= baselineTimeMS;
+          jobFinishTimeMS -= baselineTimeMS;
+          if (jobStartTimeMS < 0) {
+            LOG.warn("Warning: reset job " + oldJobId + " start time to 0.");
+            jobFinishTimeMS = jobFinishTimeMS - jobStartTimeMS;
+            jobStartTimeMS = 0;
+          }
+
+          boolean isTracked = trackedApps.contains(oldJobId);
+          int queueSize = queueAppNumMap.containsKey(jobQueue) ?
+                  queueAppNumMap.get(jobQueue) : 0;
+          queueSize ++;
+          queueAppNumMap.put(jobQueue, queueSize);
+
+          List<ContainerSimulator> containerList =
+                  new ArrayList<ContainerSimulator>();
+          // map tasks
+          for(LoggedTask mapTask : job.getMapTasks()) {
+            LoggedTaskAttempt taskAttempt = mapTask.getAttempts()
+                    .get(mapTask.getAttempts().size() - 1);
+            String hostname = taskAttempt.getHostName().getValue();
+            long containerLifeTime = taskAttempt.getFinishTime()
+                    - taskAttempt.getStartTime();
+            containerList.add(new ContainerSimulator(containerResource,
+                    containerLifeTime, hostname, 10, "map"));
+          }
+
+          // reduce tasks
+          for(LoggedTask reduceTask : job.getReduceTasks()) {
+            LoggedTaskAttempt taskAttempt = reduceTask.getAttempts()
+                    .get(reduceTask.getAttempts().size() - 1);
+            String hostname = taskAttempt.getHostName().getValue();
+            long containerLifeTime = taskAttempt.getFinishTime()
+                    - taskAttempt.getStartTime();
+            containerList.add(new ContainerSimulator(containerResource,
+                    containerLifeTime, hostname, 20, "reduce"));
+          }
+
+          // create a new AM
+          AMSimulator amSim = (AMSimulator) ReflectionUtils.newInstance(
+                  amClassMap.get(jobType), conf);
+          if (amSim != null) {
+            amSim.init(AM_ID ++, heartbeatInterval, containerList,
+                    rm, this, jobStartTimeMS, jobFinishTimeMS, user, jobQueue,
+                    isTracked, oldJobId);
+            runner.schedule(amSim);
+            maxRuntime = Math.max(maxRuntime, jobFinishTimeMS);
+            numTasks += containerList.size();
+            amMap.put(oldJobId, amSim);
+          }
+        }
+      } finally {
+        reader.close();
+      }
+    }
+  }
+  
+  private void printSimulationInfo() {
+    if (printSimulation) {
+      // node
+      LOG.info("------------------------------------");
+      LOG.info(MessageFormat.format("# nodes = {0}, # racks = {1}, capacity " +
+              "of each node {2} MB memory and {3} vcores.",
+              numNMs, numRacks, nmMemoryMB, nmVCores));
+      LOG.info("------------------------------------");
+      // job
+      LOG.info(MessageFormat.format("# applications = {0}, # total " +
+              "tasks = {1}, average # tasks per application = {2}",
+              numAMs, numTasks, (int)(Math.ceil((numTasks + 0.0) / numAMs))));
+      LOG.info("JobId\tQueue\tAMType\tDuration\t#Tasks");
+      for (Map.Entry<String, AMSimulator> entry : amMap.entrySet()) {
+        AMSimulator am = entry.getValue();
+        LOG.info(entry.getKey() + "\t" + am.getQueue() + "\t" + am.getAMType() 
+            + "\t" + am.getDuration() + "\t" + am.getNumTasks());
+      }
+      LOG.info("------------------------------------");
+      // queue
+      LOG.info(MessageFormat.format("number of queues = {0}  average " +
+              "number of apps = {1}", queueAppNumMap.size(),
+              (int)(Math.ceil((numAMs + 0.0) / queueAppNumMap.size()))));
+      LOG.info("------------------------------------");
+      // runtime
+      LOG.info(MessageFormat.format("estimated simulation time is {0}" +
+              " seconds", (long)(Math.ceil(maxRuntime / 1000.0))));
+      LOG.info("------------------------------------");
+    }
+    // package these information in the simulateInfoMap used by other places
+    simulateInfoMap.put("Number of racks", numRacks);
+    simulateInfoMap.put("Number of nodes", numNMs);
+    simulateInfoMap.put("Node memory (MB)", nmMemoryMB);
+    simulateInfoMap.put("Node VCores", nmVCores);
+    simulateInfoMap.put("Number of applications", numAMs);
+    simulateInfoMap.put("Number of tasks", numTasks);
+    simulateInfoMap.put("Average tasks per applicaion",
+            (int)(Math.ceil((numTasks + 0.0) / numAMs)));
+    simulateInfoMap.put("Number of queues", queueAppNumMap.size());
+    simulateInfoMap.put("Average applications per queue",
+            (int)(Math.ceil((numAMs + 0.0) / queueAppNumMap.size())));
+    simulateInfoMap.put("Estimated simulate time (s)",
+            (long)(Math.ceil(maxRuntime / 1000.0)));
+  }
+
+  public HashMap<NodeId, NMSimulator> getNmMap() {
+    return nmMap;
+  }
+
+  public static TaskRunner getRunner() {
+    return runner;
+  }
+
+  public static void decreaseRemainingApps() {
+    remainingApps --;
+
+    if (remainingApps == 0) {
+      LOG.info("SLSRunner tears down.");
+      System.exit(0);
+    }
+  }
+
+  public static void main(String args[]) throws Exception {
+    Options options = new Options();
+    options.addOption("inputrumen", true, "input rumen files");
+    options.addOption("inputsls", true, "input sls files");
+    options.addOption("nodes", true, "input topology");
+    options.addOption("output", true, "output directory");
+    options.addOption("trackjobs", true,
+            "jobs to be tracked during simulating");
+    options.addOption("printsimulation", false,
+            "print out simulation information");
+    
+    CommandLineParser parser = new GnuParser();
+    CommandLine cmd = parser.parse(options, args);
+
+    String inputRumen = cmd.getOptionValue("inputrumen");
+    String inputSLS = cmd.getOptionValue("inputsls");
+    String output = cmd.getOptionValue("output");
+    
+    if ((inputRumen == null && inputSLS == null) || output == null) {
+      System.err.println();
+      System.err.println("ERROR: Missing input or output file");
+      System.err.println();
+      System.err.println("Options: -inputrumen|-inputsls FILE,FILE... " +
+              "-output FILE [-nodes FILE] [-trackjobs JobId,JobId...] " +
+              "[-printsimulation]");
+      System.err.println();
+      System.exit(1);
+    }
+    
+    File outputFile = new File(output);
+    if (! outputFile.exists()
+            && ! outputFile.mkdirs()) {
+      System.err.println("ERROR: Cannot create output directory "
+              + outputFile.getAbsolutePath());
+      System.exit(1);
+    }
+    
+    Set<String> trackedJobSet = new HashSet<String>();
+    if (cmd.hasOption("trackjobs")) {
+      String trackjobs = cmd.getOptionValue("trackjobs");
+      String jobIds[] = trackjobs.split(",");
+      trackedJobSet.addAll(Arrays.asList(jobIds));
+    }
+    
+    String nodeFile = cmd.hasOption("nodes") ? cmd.getOptionValue("nodes") : "";
+
+    boolean isSLS = inputSLS != null;
+    String inputFiles[] = isSLS ? inputSLS.split(",") : inputRumen.split(",");
+    SLSRunner sls = new SLSRunner(isSLS, inputFiles, nodeFile, output,
+        trackedJobSet, cmd.hasOption("printsimulation"));
+    sls.start();
+  }
+}

+ 385 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/AMSimulator.java

@@ -0,0 +1,385 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.appmaster;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.security.PrivilegedExceptionAction;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.hadoop.security.token.Token;
+import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
+import org.apache.hadoop.yarn.api.protocolrecords
+        .FinishApplicationMasterRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse;
+
+import org.apache.hadoop.yarn.api.protocolrecords
+        .RegisterApplicationMasterRequest;
+import org.apache.hadoop.yarn.api.protocolrecords
+        .RegisterApplicationMasterResponse;
+import org.apache.hadoop.yarn.api.records.ApplicationAccessType;
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.ContainerLaunchContext;
+import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
+import org.apache.hadoop.yarn.api.records.LocalResource;
+import org.apache.hadoop.yarn.api.records.Priority;
+import org.apache.hadoop.yarn.api.records.Resource;
+import org.apache.hadoop.yarn.api.records.ResourceRequest;
+import org.apache.hadoop.yarn.exceptions.YarnException;
+import org.apache.hadoop.yarn.factories.RecordFactory;
+import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
+import org.apache.hadoop.yarn.security.AMRMTokenIdentifier;
+import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
+import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
+import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppState;
+import org.apache.hadoop.yarn.util.Records;
+import org.apache.log4j.Logger;
+
+import org.apache.hadoop.yarn.sls.scheduler.ContainerSimulator;
+import org.apache.hadoop.yarn.sls.scheduler.ResourceSchedulerWrapper;
+import org.apache.hadoop.yarn.sls.SLSRunner;
+import org.apache.hadoop.yarn.sls.scheduler.TaskRunner;
+import org.apache.hadoop.yarn.sls.utils.SLSUtils;
+
+public abstract class AMSimulator extends TaskRunner.Task {
+  // resource manager
+  protected ResourceManager rm;
+  // main
+  protected SLSRunner se;
+  // application
+  protected ApplicationId appId;
+  protected ApplicationAttemptId appAttemptId;
+  protected String oldAppId;    // jobId from the jobhistory file
+  // record factory
+  protected final static RecordFactory recordFactory =
+          RecordFactoryProvider.getRecordFactory(null);
+  // response queue
+  protected final BlockingQueue<AllocateResponse> responseQueue;
+  protected int RESPONSE_ID = 1;
+  // user name
+  protected String user;  
+  // queue name
+  protected String queue;
+  // am type
+  protected String amtype;
+  // job start/end time
+  protected long traceStartTimeMS;
+  protected long traceFinishTimeMS;
+  protected long simulateStartTimeMS;
+  protected long simulateFinishTimeMS;
+  // whether tracked in Metrics
+  protected boolean isTracked;
+  // progress
+  protected int totalContainers;
+  protected int finishedContainers;
+  
+  protected final Logger LOG = Logger.getLogger(AMSimulator.class);
+  
+  public AMSimulator() {
+    this.responseQueue = new LinkedBlockingQueue<AllocateResponse>();
+  }
+
+  public void init(int id, int heartbeatInterval, 
+      List<ContainerSimulator> containerList, ResourceManager rm, SLSRunner se,
+      long traceStartTime, long traceFinishTime, String user, String queue, 
+      boolean isTracked, String oldAppId) {
+    super.init(traceStartTime, traceStartTime + 1000000L * heartbeatInterval,
+            heartbeatInterval);
+    this.user = user;
+    this.rm = rm;
+    this.se = se;
+    this.user = user;
+    this.queue = queue;
+    this.oldAppId = oldAppId;
+    this.isTracked = isTracked;
+    this.traceStartTimeMS = traceStartTime;
+    this.traceFinishTimeMS = traceFinishTime;
+  }
+
+  /**
+   * register with RM
+   */
+  @Override
+  public void firstStep()
+          throws YarnException, IOException, InterruptedException {
+    simulateStartTimeMS = System.currentTimeMillis() - 
+                          SLSRunner.getRunner().getStartTimeMS();
+
+    // submit application, waiting until ACCEPTED
+    submitApp();
+
+    // register application master
+    registerAM();
+
+    // track app metrics
+    trackApp();
+  }
+
+  @Override
+  public void middleStep()
+          throws InterruptedException, YarnException, IOException {
+    // process responses in the queue
+    processResponseQueue();
+    
+    // send out request
+    sendContainerRequest();
+    
+    // check whether finish
+    checkStop();
+  }
+
+  @Override
+  public void lastStep() {
+    LOG.info(MessageFormat.format("Application {0} is shutting down.", appId));
+    // unregister tracking
+    if (isTracked) {
+      untrackApp();
+    }
+    // unregister application master
+    final FinishApplicationMasterRequest finishAMRequest = recordFactory
+                  .newRecordInstance(FinishApplicationMasterRequest.class);
+    finishAMRequest.setFinalApplicationStatus(FinalApplicationStatus.SUCCEEDED);
+
+    try {
+      UserGroupInformation ugi =
+              UserGroupInformation.createRemoteUser(appAttemptId.toString());
+      Token<AMRMTokenIdentifier> token =
+              rm.getRMContext().getRMApps().get(appAttemptId.getApplicationId())
+                .getRMAppAttempt(appAttemptId).getAMRMToken();
+      ugi.addTokenIdentifier(token.decodeIdentifier());
+      ugi.doAs(new PrivilegedExceptionAction<Object>() {
+        @Override
+        public Object run() throws Exception {
+          rm.getApplicationMasterService()
+                  .finishApplicationMaster(finishAMRequest);
+          return null;
+        }
+      });
+    } catch (IOException e) {
+      e.printStackTrace();
+    } catch (InterruptedException e) {
+      e.printStackTrace();
+    }
+
+    simulateFinishTimeMS = System.currentTimeMillis() -
+        SLSRunner.getRunner().getStartTimeMS();
+    // record job running information
+    ((ResourceSchedulerWrapper)rm.getResourceScheduler())
+         .addAMRuntime(appId, 
+                      traceStartTimeMS, traceFinishTimeMS, 
+                      simulateStartTimeMS, simulateFinishTimeMS);
+  }
+  
+  protected ResourceRequest createResourceRequest(
+          Resource resource, String host, int priority, int numContainers) {
+    ResourceRequest request = recordFactory
+        .newRecordInstance(ResourceRequest.class);
+    request.setCapability(resource);
+    request.setResourceName(host);
+    request.setNumContainers(numContainers);
+    Priority prio = recordFactory.newRecordInstance(Priority.class);
+    prio.setPriority(priority);
+    request.setPriority(prio);
+    return request;
+  }
+  
+  protected AllocateRequest createAllocateRequest(List<ResourceRequest> ask,
+      List<ContainerId> toRelease) {
+    AllocateRequest allocateRequest =
+            recordFactory.newRecordInstance(AllocateRequest.class);
+    allocateRequest.setResponseId(RESPONSE_ID ++);
+    allocateRequest.setAskList(ask);
+    allocateRequest.setReleaseList(toRelease);
+    return allocateRequest;
+  }
+  
+  protected AllocateRequest createAllocateRequest(List<ResourceRequest> ask) {
+    return createAllocateRequest(ask, new ArrayList<ContainerId>());
+  }
+
+  protected abstract void processResponseQueue()
+          throws InterruptedException, YarnException, IOException;
+  
+  protected abstract void sendContainerRequest()
+          throws YarnException, IOException, InterruptedException;
+  
+  protected abstract void checkStop();
+  
+  private void submitApp()
+          throws YarnException, InterruptedException, IOException {
+    // ask for new application
+    GetNewApplicationRequest newAppRequest =
+        Records.newRecord(GetNewApplicationRequest.class);
+    GetNewApplicationResponse newAppResponse = 
+        rm.getClientRMService().getNewApplication(newAppRequest);
+    appId = newAppResponse.getApplicationId();
+    
+    // submit the application
+    final SubmitApplicationRequest subAppRequest =
+        Records.newRecord(SubmitApplicationRequest.class);
+    ApplicationSubmissionContext appSubContext = 
+        Records.newRecord(ApplicationSubmissionContext.class);
+    appSubContext.setApplicationId(appId);
+    appSubContext.setMaxAppAttempts(1);
+    appSubContext.setQueue(queue);
+    appSubContext.setPriority(Priority.newInstance(0));
+    ContainerLaunchContext conLauContext = 
+        Records.newRecord(ContainerLaunchContext.class);
+    conLauContext.setApplicationACLs(
+        new HashMap<ApplicationAccessType, String>());
+    conLauContext.setCommands(new ArrayList<String>());
+    conLauContext.setEnvironment(new HashMap<String, String>());
+    conLauContext.setLocalResources(new HashMap<String, LocalResource>());
+    conLauContext.setServiceData(new HashMap<String, ByteBuffer>());
+    appSubContext.setAMContainerSpec(conLauContext);
+    appSubContext.setUnmanagedAM(true);
+    subAppRequest.setApplicationSubmissionContext(appSubContext);
+    UserGroupInformation ugi = UserGroupInformation.createRemoteUser(user);
+    ugi.doAs(new PrivilegedExceptionAction<Object>() {
+      @Override
+      public Object run() throws YarnException {
+        rm.getClientRMService().submitApplication(subAppRequest);
+        return null;
+      }
+    });
+    LOG.info(MessageFormat.format("Submit a new application {0}", appId));
+    
+    // waiting until application ACCEPTED
+    RMApp app = rm.getRMContext().getRMApps().get(appId);
+    while(app.getState() != RMAppState.ACCEPTED) {
+      Thread.sleep(50);
+    }
+
+    appAttemptId = rm.getRMContext().getRMApps().get(appId)
+            .getCurrentAppAttempt().getAppAttemptId();
+  }
+
+  private void registerAM()
+          throws YarnException, IOException, InterruptedException {
+    // register application master
+    final RegisterApplicationMasterRequest amRegisterRequest =
+            Records.newRecord(RegisterApplicationMasterRequest.class);
+    amRegisterRequest.setHost("localhost");
+    amRegisterRequest.setRpcPort(1000);
+    amRegisterRequest.setTrackingUrl("localhost:1000");
+
+    UserGroupInformation ugi =
+            UserGroupInformation.createRemoteUser(appAttemptId.toString());
+    Token<AMRMTokenIdentifier> token =
+            rm.getRMContext().getRMApps().get(appAttemptId.getApplicationId())
+                    .getRMAppAttempt(appAttemptId).getAMRMToken();
+    ugi.addTokenIdentifier(token.decodeIdentifier());
+
+    ugi.doAs(
+            new PrivilegedExceptionAction<RegisterApplicationMasterResponse>() {
+      @Override
+      public RegisterApplicationMasterResponse run() throws Exception {
+        return rm.getApplicationMasterService()
+                .registerApplicationMaster(amRegisterRequest);
+      }
+    });
+
+    LOG.info(MessageFormat.format(
+            "Register the application master for application {0}", appId));
+  }
+
+  private void trackApp() {
+    if (isTracked) {
+      ((ResourceSchedulerWrapper) rm.getResourceScheduler())
+              .addTrackedApp(appAttemptId, oldAppId);
+    }
+  }
+  public void untrackApp() {
+    if (isTracked) {
+      ((ResourceSchedulerWrapper) rm.getResourceScheduler())
+              .removeTrackedApp(appAttemptId, oldAppId);
+    }
+  }
+  
+  protected List<ResourceRequest> packageRequests(
+          List<ContainerSimulator> csList, int priority) {
+    // create requests
+    Map<String, ResourceRequest> rackLocalRequestMap = new HashMap<String, ResourceRequest>();
+    Map<String, ResourceRequest> nodeLocalRequestMap = new HashMap<String, ResourceRequest>();
+    ResourceRequest anyRequest = null;
+    for (ContainerSimulator cs : csList) {
+      String rackHostNames[] = SLSUtils.getRackHostName(cs.getHostname());
+      // check rack local
+      String rackname = rackHostNames[0];
+      if (rackLocalRequestMap.containsKey(rackname)) {
+        rackLocalRequestMap.get(rackname).setNumContainers(
+            rackLocalRequestMap.get(rackname).getNumContainers() + 1);
+      } else {
+        ResourceRequest request = createResourceRequest(
+                cs.getResource(), rackname, priority, 1);
+        rackLocalRequestMap.put(rackname, request);
+      }
+      // check node local
+      String hostname = rackHostNames[1];
+      if (nodeLocalRequestMap.containsKey(hostname)) {
+        nodeLocalRequestMap.get(hostname).setNumContainers(
+            nodeLocalRequestMap.get(hostname).getNumContainers() + 1);
+      } else {
+        ResourceRequest request = createResourceRequest(
+                cs.getResource(), hostname, priority, 1);
+        nodeLocalRequestMap.put(hostname, request);
+      }
+      // any
+      if (anyRequest == null) {
+        anyRequest = createResourceRequest(
+                cs.getResource(), ResourceRequest.ANY, priority, 1);
+      } else {
+        anyRequest.setNumContainers(anyRequest.getNumContainers() + 1);
+      }
+    }
+    List<ResourceRequest> ask = new ArrayList<ResourceRequest>();
+    ask.addAll(nodeLocalRequestMap.values());
+    ask.addAll(rackLocalRequestMap.values());
+    if (anyRequest != null) {
+      ask.add(anyRequest);
+    }
+    return ask;
+  }
+
+  public String getQueue() {
+    return queue;
+  }
+  public String getAMType() {
+    return amtype;
+  }
+  public long getDuration() {
+    return simulateFinishTimeMS - simulateStartTimeMS;
+  }
+  public int getNumTasks() {
+    return totalContainers;
+  }
+}

+ 405 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/MRAMSimulator.java

@@ -0,0 +1,405 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.appmaster;
+
+import java.io.IOException;
+import java.security.PrivilegedExceptionAction;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.hadoop.security.token.Token;
+import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
+import org.apache.hadoop.yarn.api.records.Container;
+import org.apache.hadoop.yarn.api.records.ContainerExitStatus;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.ContainerStatus;
+import org.apache.hadoop.yarn.api.records.ResourceRequest;
+import org.apache.hadoop.yarn.exceptions.YarnException;
+import org.apache.hadoop.yarn.security.AMRMTokenIdentifier;
+import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
+import org.apache.hadoop.yarn.server.utils.BuilderUtils;
+
+import org.apache.hadoop.yarn.sls.scheduler.ContainerSimulator;
+import org.apache.hadoop.yarn.sls.SLSRunner;
+import org.apache.log4j.Logger;
+
+public class MRAMSimulator extends AMSimulator {
+  /*
+  Vocabulary Used: 
+  pending -> requests which are NOT yet sent to RM
+  scheduled -> requests which are sent to RM but not yet assigned
+  assigned -> requests which are assigned to a container
+  completed -> request corresponding to which container has completed
+  
+  Maps are scheduled as soon as their requests are received. Reduces are
+  scheduled when all maps have finished (not support slow-start currently).
+  */
+  
+  private static final int PRIORITY_REDUCE = 10;
+  private static final int PRIORITY_MAP = 20;
+  
+  // pending maps
+  private LinkedList<ContainerSimulator> pendingMaps =
+          new LinkedList<ContainerSimulator>();
+  
+  // pending failed maps
+  private LinkedList<ContainerSimulator> pendingFailedMaps =
+          new LinkedList<ContainerSimulator>();
+  
+  // scheduled maps
+  private LinkedList<ContainerSimulator> scheduledMaps =
+          new LinkedList<ContainerSimulator>();
+  
+  // assigned maps
+  private Map<ContainerId, ContainerSimulator> assignedMaps =
+          new HashMap<ContainerId, ContainerSimulator>();
+  
+  // reduces which are not yet scheduled
+  private LinkedList<ContainerSimulator> pendingReduces =
+          new LinkedList<ContainerSimulator>();
+  
+  // pending failed reduces
+  private LinkedList<ContainerSimulator> pendingFailedReduces =
+          new LinkedList<ContainerSimulator>();
+ 
+  // scheduled reduces
+  private LinkedList<ContainerSimulator> scheduledReduces =
+          new LinkedList<ContainerSimulator>();
+  
+  // assigned reduces
+  private Map<ContainerId, ContainerSimulator> assignedReduces =
+          new HashMap<ContainerId, ContainerSimulator>();
+  
+  // all maps & reduces
+  private LinkedList<ContainerSimulator> allMaps =
+          new LinkedList<ContainerSimulator>();
+  private LinkedList<ContainerSimulator> allReduces =
+          new LinkedList<ContainerSimulator>();
+
+  // counters
+  private int mapFinished = 0;
+  private int mapTotal = 0;
+  private int reduceFinished = 0;
+  private int reduceTotal = 0;
+  // waiting for AM container 
+  private boolean isAMContainerRunning = false;
+  private Container amContainer;
+  // finished
+  private boolean isFinished = false;
+  // resource for AM container
+  private final static int MR_AM_CONTAINER_RESOURCE_MEMORY_MB = 1024;
+  private final static int MR_AM_CONTAINER_RESOURCE_VCORES = 1;
+
+  public final Logger LOG = Logger.getLogger(MRAMSimulator.class);
+
+  public void init(int id, int heartbeatInterval,
+      List<ContainerSimulator> containerList, ResourceManager rm, SLSRunner se,
+      long traceStartTime, long traceFinishTime, String user, String queue, 
+      boolean isTracked, String oldAppId) {
+    super.init(id, heartbeatInterval, containerList, rm, se, 
+              traceStartTime, traceFinishTime, user, queue,
+              isTracked, oldAppId);
+    amtype = "mapreduce";
+    
+    // get map/reduce tasks
+    for (ContainerSimulator cs : containerList) {
+      if (cs.getType().equals("map")) {
+        cs.setPriority(PRIORITY_MAP);
+        pendingMaps.add(cs);
+      } else if (cs.getType().equals("reduce")) {
+        cs.setPriority(PRIORITY_REDUCE);
+        pendingReduces.add(cs);
+      }
+    }
+    allMaps.addAll(pendingMaps);
+    allReduces.addAll(pendingReduces);
+    mapTotal = pendingMaps.size();
+    reduceTotal = pendingReduces.size();
+    totalContainers = mapTotal + reduceTotal;
+  }
+
+  @Override
+  public void firstStep()
+          throws YarnException, IOException, InterruptedException {
+    super.firstStep();
+    
+    requestAMContainer();
+  }
+
+  /**
+   * send out request for AM container
+   */
+  protected void requestAMContainer()
+          throws YarnException, IOException, InterruptedException {
+    List<ResourceRequest> ask = new ArrayList<ResourceRequest>();
+    ResourceRequest amRequest = createResourceRequest(
+            BuilderUtils.newResource(MR_AM_CONTAINER_RESOURCE_MEMORY_MB,
+                    MR_AM_CONTAINER_RESOURCE_VCORES),
+            ResourceRequest.ANY, 1, 1);
+    ask.add(amRequest);
+    LOG.debug(MessageFormat.format("Application {0} sends out allocate " +
+            "request for its AM", appId));
+    final AllocateRequest request = this.createAllocateRequest(ask);
+
+    UserGroupInformation ugi =
+            UserGroupInformation.createRemoteUser(appAttemptId.toString());
+    Token<AMRMTokenIdentifier> token = rm.getRMContext().getRMApps()
+            .get(appAttemptId.getApplicationId())
+            .getRMAppAttempt(appAttemptId).getAMRMToken();
+    ugi.addTokenIdentifier(token.decodeIdentifier());
+    AllocateResponse response = ugi.doAs(
+            new PrivilegedExceptionAction<AllocateResponse>() {
+      @Override
+      public AllocateResponse run() throws Exception {
+        return rm.getApplicationMasterService().allocate(request);
+      }
+    });
+
+    // waiting until the AM container is allocated
+    while (true) {
+      if (response != null && ! response.getAllocatedContainers().isEmpty()) {
+        // get AM container
+        Container container = response.getAllocatedContainers().get(0);
+        se.getNmMap().get(container.getNodeId())
+                .addNewContainer(container, -1L);
+        // start AM container
+        amContainer = container;
+        LOG.debug(MessageFormat.format("Application {0} starts its " +
+                "AM container ({1}).", appId, amContainer.getId()));
+        isAMContainerRunning = true;
+        break;
+      }
+      // this sleep time is different from HeartBeat
+      Thread.sleep(1000);
+      // send out empty request
+      sendContainerRequest();
+      response = responseQueue.take();
+    }
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  protected void processResponseQueue()
+          throws InterruptedException, YarnException, IOException {
+    while (! responseQueue.isEmpty()) {
+      AllocateResponse response = responseQueue.take();
+
+      // check completed containers
+      if (! response.getCompletedContainersStatuses().isEmpty()) {
+        for (ContainerStatus cs : response.getCompletedContainersStatuses()) {
+          ContainerId containerId = cs.getContainerId();
+          if (cs.getExitStatus() == ContainerExitStatus.SUCCESS) {
+            if (assignedMaps.containsKey(containerId)) {
+              LOG.debug(MessageFormat.format("Application {0} has one" +
+                      "mapper finished ({1}).", appId, containerId));
+              assignedMaps.remove(containerId);
+              mapFinished ++;
+              finishedContainers ++;
+            } else if (assignedReduces.containsKey(containerId)) {
+              LOG.debug(MessageFormat.format("Application {0} has one" +
+                      "reducer finished ({1}).", appId, containerId));
+              assignedReduces.remove(containerId);
+              reduceFinished ++;
+              finishedContainers ++;
+            } else {
+              // am container released event
+              isFinished = true;
+              LOG.info(MessageFormat.format("Application {0} goes to " +
+                      "finish.", appId));
+            }
+          } else {
+            // container to be killed
+            if (assignedMaps.containsKey(containerId)) {
+              LOG.debug(MessageFormat.format("Application {0} has one " +
+                      "mapper killed ({1}).", appId, containerId));
+              pendingFailedMaps.add(assignedMaps.remove(containerId));
+            } else if (assignedReduces.containsKey(containerId)) {
+              LOG.debug(MessageFormat.format("Application {0} has one " +
+                      "reducer killed ({1}).", appId, containerId));
+              pendingFailedReduces.add(assignedReduces.remove(containerId));
+            } else {
+              LOG.info(MessageFormat.format("Application {0}'s AM is " +
+                      "going to be killed. Restarting...", appId));
+              restart();
+            }
+          }
+        }
+      }
+      
+      // check finished
+      if (isAMContainerRunning &&
+              (mapFinished == mapTotal) &&
+              (reduceFinished == reduceTotal)) {
+        // to release the AM container
+        se.getNmMap().get(amContainer.getNodeId())
+                .cleanupContainer(amContainer.getId());
+        isAMContainerRunning = false;
+        LOG.debug(MessageFormat.format("Application {0} sends out event " +
+                "to clean up its AM container.", appId));
+        isFinished = true;
+      }
+
+      // check allocated containers
+      for (Container container : response.getAllocatedContainers()) {
+        if (! scheduledMaps.isEmpty()) {
+          ContainerSimulator cs = scheduledMaps.remove();
+          LOG.debug(MessageFormat.format("Application {0} starts a " +
+                  "launch a mapper ({1}).", appId, container.getId()));
+          assignedMaps.put(container.getId(), cs);
+          se.getNmMap().get(container.getNodeId())
+                  .addNewContainer(container, cs.getLifeTime());
+        } else if (! this.scheduledReduces.isEmpty()) {
+          ContainerSimulator cs = scheduledReduces.remove();
+          LOG.debug(MessageFormat.format("Application {0} starts a " +
+                  "launch a reducer ({1}).", appId, container.getId()));
+          assignedReduces.put(container.getId(), cs);
+          se.getNmMap().get(container.getNodeId())
+                  .addNewContainer(container, cs.getLifeTime());
+        }
+      }
+    }
+  }
+  
+  /**
+   * restart running because of the am container killed
+   */
+  private void restart()
+          throws YarnException, IOException, InterruptedException {
+    // clear 
+    finishedContainers = 0;
+    isFinished = false;
+    mapFinished = 0;
+    reduceFinished = 0;
+    pendingFailedMaps.clear();
+    pendingMaps.clear();
+    pendingReduces.clear();
+    pendingFailedReduces.clear();
+    pendingMaps.addAll(allMaps);
+    pendingReduces.addAll(pendingReduces);
+    isAMContainerRunning = false;
+    amContainer = null;
+    // resent am container request
+    requestAMContainer();
+  }
+
+  @Override
+  protected void sendContainerRequest()
+          throws YarnException, IOException, InterruptedException {
+    if (isFinished) {
+      return;
+    }
+
+    // send out request
+    List<ResourceRequest> ask = null;
+    if (isAMContainerRunning) {
+      if (mapFinished != mapTotal) {
+        // map phase
+        if (! pendingMaps.isEmpty()) {
+          ask = packageRequests(pendingMaps, PRIORITY_MAP);
+          LOG.debug(MessageFormat.format("Application {0} sends out " +
+                  "request for {1} mappers.", appId, pendingMaps.size()));
+          scheduledMaps.addAll(pendingMaps);
+          pendingMaps.clear();
+        } else if (! pendingFailedMaps.isEmpty() && scheduledMaps.isEmpty()) {
+          ask = packageRequests(pendingFailedMaps, PRIORITY_MAP);
+          LOG.debug(MessageFormat.format("Application {0} sends out " +
+                  "requests for {1} failed mappers.", appId,
+                  pendingFailedMaps.size()));
+          scheduledMaps.addAll(pendingFailedMaps);
+          pendingFailedMaps.clear();
+        }
+      } else if (reduceFinished != reduceTotal) {
+        // reduce phase
+        if (! pendingReduces.isEmpty()) {
+          ask = packageRequests(pendingReduces, PRIORITY_REDUCE);
+          LOG.debug(MessageFormat.format("Application {0} sends out " +
+                  "requests for {1} reducers.", appId, pendingReduces.size()));
+          scheduledReduces.addAll(pendingReduces);
+          pendingReduces.clear();
+        } else if (! pendingFailedReduces.isEmpty()
+                && scheduledReduces.isEmpty()) {
+          ask = packageRequests(pendingFailedReduces, PRIORITY_REDUCE);
+          LOG.debug(MessageFormat.format("Application {0} sends out " +
+                  "request for {1} failed reducers.", appId,
+                  pendingFailedReduces.size()));
+          scheduledReduces.addAll(pendingFailedReduces);
+          pendingFailedReduces.clear();
+        }
+      }
+    }
+    if (ask == null) {
+      ask = new ArrayList<ResourceRequest>();
+    }
+    
+    final AllocateRequest request = createAllocateRequest(ask);
+    if (totalContainers == 0) {
+      request.setProgress(1.0f);
+    } else {
+      request.setProgress((float) finishedContainers / totalContainers);
+    }
+
+    UserGroupInformation ugi =
+            UserGroupInformation.createRemoteUser(appAttemptId.toString());
+    Token<AMRMTokenIdentifier> token = rm.getRMContext().getRMApps()
+            .get(appAttemptId.getApplicationId())
+            .getRMAppAttempt(appAttemptId).getAMRMToken();
+    ugi.addTokenIdentifier(token.decodeIdentifier());
+    AllocateResponse response = ugi.doAs(
+            new PrivilegedExceptionAction<AllocateResponse>() {
+      @Override
+      public AllocateResponse run() throws Exception {
+        return rm.getApplicationMasterService().allocate(request);
+      }
+    });
+    if (response != null) {
+      responseQueue.put(response);
+    }
+  }
+
+  @Override
+  protected void checkStop() {
+    if (isFinished) {
+      super.setEndTime(System.currentTimeMillis());
+    }
+  }
+
+  @Override
+  public void lastStep() {
+    super.lastStep();
+
+    // clear data structures
+    allMaps.clear();
+    allReduces.clear();
+    assignedMaps.clear();
+    assignedReduces.clear();
+    pendingFailedMaps.clear();
+    pendingFailedReduces.clear();
+    pendingMaps.clear();
+    pendingReduces.clear();
+    scheduledMaps.clear();
+    scheduledReduces.clear();
+    responseQueue.clear();
+  }
+}

+ 68 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/conf/SLSConfiguration.java

@@ -0,0 +1,68 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.conf;
+
+public class SLSConfiguration {
+  // sls
+  public static final String PREFIX = "yarn.sls.";
+  // runner
+  public static final String RUNNER_PREFIX = PREFIX + "runner.";
+  public static final String RUNNER_POOL_SIZE = RUNNER_PREFIX + "pool.size";
+  public static final int RUNNER_POOL_SIZE_DEFAULT = 10;
+  // scheduler
+  public static final String SCHEDULER_PREFIX = PREFIX + "scheduler.";
+  public static final String RM_SCHEDULER = SCHEDULER_PREFIX + "class";
+  // metrics
+  public static final String METRICS_PREFIX = PREFIX + "metrics.";
+  public static final String METRICS_SWITCH = METRICS_PREFIX + "switch"; 
+  public static final String METRICS_WEB_ADDRESS_PORT = METRICS_PREFIX
+                                                  + "web.address.port";
+  public static final String METRICS_OUTPUT_DIR = METRICS_PREFIX + "output";
+  public static final int METRICS_WEB_ADDRESS_PORT_DEFAULT = 10001;
+  public static final String METRICS_TIMER_WINDOW_SIZE = METRICS_PREFIX
+                                                  + "timer.window.size";
+  public static final int METRICS_TIMER_WINDOW_SIZE_DEFAULT = 100;
+  public static final String METRICS_RECORD_INTERVAL_MS = METRICS_PREFIX
+                                                  + "record.interval.ms";
+  public static final int METRICS_RECORD_INTERVAL_MS_DEFAULT = 1000;
+  // nm
+  public static final String NM_PREFIX = PREFIX + "nm.";
+  public static final String NM_MEMORY_MB = NM_PREFIX + "memory.mb";
+  public static final int NM_MEMORY_MB_DEFAULT = 10240;
+  public static final String NM_VCORES = NM_PREFIX + "vcores";
+  public static final int NM_VCORES_DEFAULT = 10;
+  public static final String NM_HEARTBEAT_INTERVAL_MS = NM_PREFIX
+                                                  + "heartbeat.interval.ms";
+  public static final int NM_HEARTBEAT_INTERVAL_MS_DEFAULT = 1000;
+  // am
+  public static final String AM_PREFIX = PREFIX + "am.";
+  public static final String AM_HEARTBEAT_INTERVAL_MS = AM_PREFIX
+                                                  + "heartbeat.interval.ms";
+  public static final int AM_HEARTBEAT_INTERVAL_MS_DEFAULT = 1000;
+  public static final String AM_TYPE = AM_PREFIX + "type.";
+
+  // container
+  public static final String CONTAINER_PREFIX = PREFIX + "container.";
+  public static final String CONTAINER_MEMORY_MB = CONTAINER_PREFIX
+          + "memory.mb";
+  public static final int CONTAINER_MEMORY_MB_DEFAULT = 1024;
+  public static final String CONTAINER_VCORES = CONTAINER_PREFIX + "vcores";
+  public static final int CONTAINER_VCORES_DEFAULT = 1;
+
+}

+ 261 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/nodemanager/NMSimulator.java

@@ -0,0 +1,261 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.nodemanager;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.DelayQueue;
+
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.Container;
+import org.apache.hadoop.yarn.api.records.ContainerExitStatus;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.ContainerState;
+import org.apache.hadoop.yarn.api.records.ContainerStatus;
+import org.apache.hadoop.yarn.exceptions.YarnException;
+import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatRequest;
+import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse;
+import org.apache.hadoop.yarn.server.api.protocolrecords
+        .RegisterNodeManagerRequest;
+import org.apache.hadoop.yarn.server.api.protocolrecords
+        .RegisterNodeManagerResponse;
+import org.apache.hadoop.yarn.server.api.records.MasterKey;
+import org.apache.hadoop.yarn.server.api.records.NodeAction;
+import org.apache.hadoop.yarn.server.api.records.NodeHealthStatus;
+import org.apache.hadoop.yarn.server.api.records.NodeStatus;
+import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
+import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
+import org.apache.hadoop.yarn.server.utils.BuilderUtils;
+import org.apache.hadoop.yarn.util.Records;
+import org.apache.log4j.Logger;
+
+import org.apache.hadoop.yarn.sls.scheduler.ContainerSimulator;
+import org.apache.hadoop.yarn.sls.scheduler.TaskRunner;
+import org.apache.hadoop.yarn.sls.utils.SLSUtils;
+
+public class NMSimulator extends TaskRunner.Task {
+  // node resource
+  private RMNode node;
+  // master key
+  private MasterKey masterKey;
+  // containers with various STATE
+  private List<ContainerId> completedContainerList;
+  private List<ContainerId> releasedContainerList;
+  private DelayQueue<ContainerSimulator> containerQueue;
+  private Map<ContainerId, ContainerSimulator> runningContainers;
+  private List<ContainerId> amContainerList;
+  // resource manager
+  private ResourceManager rm;
+  // heart beat response id
+  private int RESPONSE_ID = 1;
+  private final static Logger LOG = Logger.getLogger(NMSimulator.class);
+  
+  public void init(String nodeIdStr, int memory, int cores,
+          int dispatchTime, int heartBeatInterval, ResourceManager rm)
+          throws IOException, YarnException {
+    super.init(dispatchTime, dispatchTime + 1000000L * heartBeatInterval,
+            heartBeatInterval);
+    // create resource
+    String rackHostName[] = SLSUtils.getRackHostName(nodeIdStr);
+    this.node = NodeInfo.newNodeInfo(rackHostName[0], rackHostName[1], 
+                  BuilderUtils.newResource(memory, cores));
+    this.rm = rm;
+    // init data structures
+    completedContainerList =
+            Collections.synchronizedList(new ArrayList<ContainerId>());
+    releasedContainerList =
+            Collections.synchronizedList(new ArrayList<ContainerId>());
+    containerQueue = new DelayQueue<ContainerSimulator>();
+    amContainerList =
+            Collections.synchronizedList(new ArrayList<ContainerId>());
+    runningContainers =
+            new ConcurrentHashMap<ContainerId, ContainerSimulator>();
+    // register NM with RM
+    RegisterNodeManagerRequest req =
+            Records.newRecord(RegisterNodeManagerRequest.class);
+    req.setNodeId(node.getNodeID());
+    req.setResource(node.getTotalCapability());
+    req.setHttpPort(80);
+    RegisterNodeManagerResponse response = rm.getResourceTrackerService()
+            .registerNodeManager(req);
+    masterKey = response.getNMTokenMasterKey();
+  }
+
+  @Override
+  public void firstStep() throws YarnException, IOException {
+    // do nothing
+  }
+
+  @Override
+  public void middleStep() {
+    // we check the lifetime for each running containers
+    ContainerSimulator cs = null;
+    synchronized(completedContainerList) {
+      while ((cs = containerQueue.poll()) != null) {
+        runningContainers.remove(cs.getId());
+        completedContainerList.add(cs.getId());
+        LOG.debug(MessageFormat.format("Container {0} has completed",
+                cs.getId()));
+      }
+    }
+    
+    // send heart beat
+    NodeHeartbeatRequest beatRequest =
+            Records.newRecord(NodeHeartbeatRequest.class);
+    beatRequest.setLastKnownNMTokenMasterKey(masterKey);
+    NodeStatus ns = Records.newRecord(NodeStatus.class);
+    
+    ns.setContainersStatuses(generateContainerStatusList());
+    ns.setNodeId(node.getNodeID());
+    ns.setKeepAliveApplications(new ArrayList<ApplicationId>());
+    ns.setResponseId(RESPONSE_ID ++);
+    ns.setNodeHealthStatus(NodeHealthStatus.newInstance(true, "", 0));
+    beatRequest.setNodeStatus(ns);
+    try {
+      NodeHeartbeatResponse beatResponse =
+              rm.getResourceTrackerService().nodeHeartbeat(beatRequest);
+      if (! beatResponse.getContainersToCleanup().isEmpty()) {
+        // remove from queue
+        synchronized(releasedContainerList) {
+          for (ContainerId containerId : beatResponse.getContainersToCleanup()){
+            if (amContainerList.contains(containerId)) {
+              // AM container (not killed?, only release)
+              synchronized(amContainerList) {
+                amContainerList.remove(containerId);
+              }
+              LOG.debug(MessageFormat.format("NodeManager {0} releases " +
+                      "an AM ({1}).", node.getNodeID(), containerId));
+            } else {
+              cs = runningContainers.remove(containerId);
+              containerQueue.remove(cs);
+              releasedContainerList.add(containerId);
+              LOG.debug(MessageFormat.format("NodeManager {0} releases a " +
+                      "container ({1}).", node.getNodeID(), containerId));
+            }
+          }
+        }
+      }
+      if (beatResponse.getNodeAction() == NodeAction.SHUTDOWN) {
+        lastStep();
+      }
+    } catch (YarnException e) {
+      e.printStackTrace();
+    } catch (IOException e) {
+      e.printStackTrace();
+    }
+  }
+
+  @Override
+  public void lastStep() {
+    // do nothing
+  }
+
+  /**
+   * catch status of all containers located on current node
+   */
+  private ArrayList<ContainerStatus> generateContainerStatusList() {
+    ArrayList<ContainerStatus> csList = new ArrayList<ContainerStatus>();
+    // add running containers
+    for (ContainerSimulator container : runningContainers.values()) {
+      csList.add(newContainerStatus(container.getId(),
+        ContainerState.RUNNING, ContainerExitStatus.SUCCESS));
+    }
+    synchronized(amContainerList) {
+      for (ContainerId cId : amContainerList) {
+        csList.add(newContainerStatus(cId,
+            ContainerState.RUNNING, ContainerExitStatus.SUCCESS));
+      }
+    }
+    // add complete containers
+    synchronized(completedContainerList) {
+      for (ContainerId cId : completedContainerList) {
+        LOG.debug(MessageFormat.format("NodeManager {0} completed" +
+                " container ({1}).", node.getNodeID(), cId));
+        csList.add(newContainerStatus(
+                cId, ContainerState.COMPLETE, ContainerExitStatus.SUCCESS));
+      }
+      completedContainerList.clear();
+    }
+    // released containers
+    synchronized(releasedContainerList) {
+      for (ContainerId cId : releasedContainerList) {
+        LOG.debug(MessageFormat.format("NodeManager {0} released container" +
+                " ({1}).", node.getNodeID(), cId));
+        csList.add(newContainerStatus(
+                cId, ContainerState.COMPLETE, ContainerExitStatus.ABORTED));
+      }
+      releasedContainerList.clear();
+    }
+    return csList;
+  }
+
+  private ContainerStatus newContainerStatus(ContainerId cId, 
+                                             ContainerState state,
+                                             int exitState) {
+    ContainerStatus cs = Records.newRecord(ContainerStatus.class);
+    cs.setContainerId(cId);
+    cs.setState(state);
+    cs.setExitStatus(exitState);
+    return cs;
+  }
+
+  public RMNode getNode() {
+    return node;
+  }
+
+  /**
+   * launch a new container with the given life time
+   */
+  public void addNewContainer(Container container, long lifeTimeMS) {
+    LOG.debug(MessageFormat.format("NodeManager {0} launches a new " +
+            "container ({1}).", node.getNodeID(), container.getId()));
+    if (lifeTimeMS != -1) {
+      // normal container
+      ContainerSimulator cs = new ContainerSimulator(container.getId(),
+              container.getResource(), lifeTimeMS + System.currentTimeMillis(),
+              lifeTimeMS);
+      containerQueue.add(cs);
+      runningContainers.put(cs.getId(), cs);
+    } else {
+      // AM container
+      // -1 means AMContainer
+      synchronized(amContainerList) {
+        amContainerList.add(container.getId());
+      }
+    }
+  }
+
+  /**
+   * clean up an AM container and add to completed list
+   * @param containerId id of the container to be cleaned
+   */
+  public void cleanupContainer(ContainerId containerId) {
+    synchronized(amContainerList) {
+      amContainerList.remove(containerId);
+    }
+    synchronized(completedContainerList) {
+      completedContainerList.add(containerId);
+    }
+  }
+}

+ 167 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/nodemanager/NodeInfo.java

@@ -0,0 +1,167 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.nodemanager;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.hadoop.net.Node;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ContainerExitStatus;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.ContainerState;
+import org.apache.hadoop.yarn.api.records.ContainerStatus;
+import org.apache.hadoop.yarn.api.records.NodeId;
+import org.apache.hadoop.yarn.api.records.NodeState;
+import org.apache.hadoop.yarn.api.records.Resource;
+import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse;
+import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
+import org.apache.hadoop.yarn.server.resourcemanager.rmnode
+        .UpdatedContainerInfo;
+
+public class NodeInfo {
+  private static int NODE_ID = 0;
+
+  public static NodeId newNodeID(String host, int port) {
+    return NodeId.newInstance(host, port);
+  }
+
+  private static class FakeRMNodeImpl implements RMNode {
+    private NodeId nodeId;
+    private String hostName;
+    private String nodeAddr;
+    private String httpAddress;
+    private int cmdPort;
+    private Resource perNode;
+    private String rackName;
+    private String healthReport;
+    private NodeState state;
+    private List<ContainerId> toCleanUpContainers;
+    private List<ApplicationId> toCleanUpApplications;
+    
+    public FakeRMNodeImpl(NodeId nodeId, String nodeAddr, String httpAddress,
+        Resource perNode, String rackName, String healthReport,
+        int cmdPort, String hostName, NodeState state) {
+      this.nodeId = nodeId;
+      this.nodeAddr = nodeAddr;
+      this.httpAddress = httpAddress;
+      this.perNode = perNode;
+      this.rackName = rackName;
+      this.healthReport = healthReport;
+      this.cmdPort = cmdPort;
+      this.hostName = hostName;
+      this.state = state;
+      toCleanUpApplications = new ArrayList<ApplicationId>();
+      toCleanUpContainers = new ArrayList<ContainerId>();
+    }
+
+    public NodeId getNodeID() {
+      return nodeId;
+    }
+    
+    public String getHostName() {
+      return hostName;
+    }
+    
+    public int getCommandPort() {
+      return cmdPort;
+    }
+    
+    public int getHttpPort() {
+      return 0;
+    }
+
+    public String getNodeAddress() {
+      return nodeAddr;
+    }
+
+    public String getHttpAddress() {
+      return httpAddress;
+    }
+
+    public String getHealthReport() {
+      return healthReport;
+    }
+
+    public long getLastHealthReportTime() {
+      return 0; 
+    }
+
+    public Resource getTotalCapability() {
+      return perNode;
+    }
+
+    public String getRackName() {
+      return rackName;
+    }
+
+    public Node getNode() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public NodeState getState() {
+      return state;
+    }
+
+    public List<ContainerId> getContainersToCleanUp() {
+      return toCleanUpContainers;
+    }
+
+    public List<ApplicationId> getAppsToCleanup() {
+      return toCleanUpApplications;
+    }
+
+    public void updateNodeHeartbeatResponseForCleanup(
+            NodeHeartbeatResponse response) {
+    }
+
+    public NodeHeartbeatResponse getLastNodeHeartBeatResponse() {
+      return null;
+    }
+
+    public List<UpdatedContainerInfo> pullContainerUpdates() {
+      ArrayList<UpdatedContainerInfo> list = new ArrayList<UpdatedContainerInfo>();
+      
+      ArrayList<ContainerStatus> list2 = new ArrayList<ContainerStatus>();
+      for(ContainerId cId : this.toCleanUpContainers) {
+        list2.add(ContainerStatus.newInstance(cId, ContainerState.RUNNING, "", 
+          ContainerExitStatus.SUCCESS));
+      }
+      list.add(new UpdatedContainerInfo(new ArrayList<ContainerStatus>(), 
+        list2));
+      return list;
+    }
+  }
+  
+  public static RMNode newNodeInfo(String rackName, String hostName,
+                              final Resource resource, int port) {
+    final NodeId nodeId = newNodeID(hostName, port);
+    final String nodeAddr = hostName + ":" + port;
+    final String httpAddress = hostName;
+    
+    return new FakeRMNodeImpl(nodeId, nodeAddr, httpAddress,
+        resource, rackName, "Me good",
+        port, hostName, null);
+  }
+  
+  public static RMNode newNodeInfo(String rackName, String hostName,
+                              final Resource resource) {
+    return newNodeInfo(rackName, hostName, resource, NODE_ID++);
+  }
+}

+ 31 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/CapacitySchedulerMetrics.java

@@ -0,0 +1,31 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.scheduler;
+
+public class CapacitySchedulerMetrics extends SchedulerMetrics {
+
+  public CapacitySchedulerMetrics() {
+    super();
+  }
+
+  @Override
+  public void trackQueue(String queueName) {
+    trackedQueues.add(queueName);
+  }
+}

+ 113 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/ContainerSimulator.java

@@ -0,0 +1,113 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import java.util.concurrent.Delayed;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.Resource;
+
+public class ContainerSimulator implements Delayed {
+  // id
+  private ContainerId id;
+  // resource allocated
+  private Resource resource;
+  // end time
+  private long endTime;
+  // life time (ms)
+  private long lifeTime;
+  // host name
+  private String hostname;
+  // priority
+  private int priority;
+  // type 
+  private String type;
+
+  /**
+   * invoked when AM schedules containers to allocate
+   */
+  public ContainerSimulator(Resource resource, long lifeTime,
+      String hostname, int priority, String type) {
+    this.resource = resource;
+    this.lifeTime = lifeTime;
+    this.hostname = hostname;
+    this.priority = priority;
+    this.type = type;
+  }
+
+  /**
+   * invoke when NM schedules containers to run
+   */
+  public ContainerSimulator(ContainerId id, Resource resource, long endTime,
+      long lifeTime) {
+    this.id = id;
+    this.resource = resource;
+    this.endTime = endTime;
+    this.lifeTime = lifeTime;
+  }
+  
+  public Resource getResource() {
+    return resource;
+  }
+  
+  public ContainerId getId() {
+    return id;
+  }
+
+  @Override
+  public int compareTo(Delayed o) {
+    if (!(o instanceof ContainerSimulator)) {
+      throw new IllegalArgumentException(
+              "Parameter must be a ContainerSimulator instance");
+    }
+    ContainerSimulator other = (ContainerSimulator) o;
+    return (int) Math.signum(endTime - other.endTime);
+  }
+
+  @Override
+  public long getDelay(TimeUnit unit) {
+    return unit.convert(endTime - System.currentTimeMillis(),
+          TimeUnit.MILLISECONDS);
+  }
+  
+  public long getLifeTime() {
+    return lifeTime;
+  }
+  
+  public String getHostname() {
+    return hostname;
+  }
+  
+  public long getEndTime() {
+    return endTime;
+  }
+  
+  public int getPriority() {
+    return priority;
+  }
+  
+  public String getType() {
+    return type;
+  }
+  
+  public void setPriority(int p) {
+    priority = p;
+  }
+}

+ 266 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/FairSchedulerMetrics.java

@@ -0,0 +1,266 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
+        .AppSchedulable;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueue;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
+        .FairScheduler;
+
+import com.codahale.metrics.Gauge;
+import org.apache.hadoop.yarn.sls.SLSRunner;
+
+public class FairSchedulerMetrics extends SchedulerMetrics {
+
+  private int totalMemoryMB = Integer.MAX_VALUE;
+  private int totalVCores = Integer.MAX_VALUE;
+  private boolean maxReset = false;
+
+  public FairSchedulerMetrics() {
+    super();
+    appTrackedMetrics.add("demand.memory");
+    appTrackedMetrics.add("demand.vcores");
+    appTrackedMetrics.add("usage.memory");
+    appTrackedMetrics.add("usage.vcores");
+    appTrackedMetrics.add("minshare.memory");
+    appTrackedMetrics.add("minshare.vcores");
+    appTrackedMetrics.add("maxshare.memory");
+    appTrackedMetrics.add("maxshare.vcores");
+    appTrackedMetrics.add("fairshare.memory");
+    appTrackedMetrics.add("fairshare.vcores");
+    queueTrackedMetrics.add("demand.memory");
+    queueTrackedMetrics.add("demand.vcores");
+    queueTrackedMetrics.add("usage.memory");
+    queueTrackedMetrics.add("usage.vcores");
+    queueTrackedMetrics.add("minshare.memory");
+    queueTrackedMetrics.add("minshare.vcores");
+    queueTrackedMetrics.add("maxshare.memory");
+    queueTrackedMetrics.add("maxshare.vcores");
+    queueTrackedMetrics.add("fairshare.memory");
+    queueTrackedMetrics.add("fairshare.vcores");
+  }
+  
+  @Override
+  public void trackApp(ApplicationAttemptId appAttemptId, String oldAppId) {
+    super.trackApp(appAttemptId, oldAppId);
+    FairScheduler fair = (FairScheduler) scheduler;
+    final AppSchedulable app = fair.getSchedulerApp(appAttemptId)
+            .getAppSchedulable();
+    metrics.register("variable.app." + oldAppId + ".demand.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return app.getDemand().getMemory();
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".demand.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return app.getDemand().getVirtualCores();
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".usage.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return app.getResourceUsage().getMemory();
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".usage.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return app.getResourceUsage().getVirtualCores();
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".minshare.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return app.getMinShare().getMemory();
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".minshare.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return app.getMinShare().getMemory();
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".maxshare.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return Math.min(app.getMaxShare().getMemory(), totalMemoryMB);
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".maxshare.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return Math.min(app.getMaxShare().getVirtualCores(), totalVCores);
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".fairshare.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return app.getFairShare().getVirtualCores();
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".fairshare.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return app.getFairShare().getVirtualCores();
+        }
+      }
+    );
+  }
+
+  @Override
+  public void trackQueue(String queueName) {
+    trackedQueues.add(queueName);
+    FairScheduler fair = (FairScheduler) scheduler;
+    final FSQueue queue = fair.getQueueManager().getQueue(queueName);
+    metrics.register("variable.queue." + queueName + ".demand.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return queue.getDemand().getMemory();
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".demand.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return queue.getDemand().getVirtualCores();
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".usage.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return queue.getResourceUsage().getMemory();
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".usage.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return queue.getResourceUsage().getVirtualCores();
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".minshare.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return queue.getMinShare().getMemory();
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".minshare.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return queue.getMinShare().getVirtualCores();
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".maxshare.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          if (! maxReset &&
+                  SLSRunner.simulateInfoMap.containsKey("Number of nodes") &&
+                  SLSRunner.simulateInfoMap.containsKey("Node memory (MB)") &&
+                  SLSRunner.simulateInfoMap.containsKey("Node VCores")) {
+            int numNMs = Integer.parseInt(
+                  SLSRunner.simulateInfoMap.get("Number of nodes").toString());
+            int numMemoryMB = Integer.parseInt(
+                  SLSRunner.simulateInfoMap.get("Node memory (MB)").toString());
+            int numVCores = Integer.parseInt(
+                  SLSRunner.simulateInfoMap.get("Node VCores").toString());
+
+            totalMemoryMB = numNMs * numMemoryMB;
+            totalVCores = numNMs * numVCores;
+            maxReset = false;
+          }
+
+          return Math.min(queue.getMaxShare().getMemory(), totalMemoryMB);
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".maxshare.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return Math.min(queue.getMaxShare().getVirtualCores(), totalVCores);
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".fairshare.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return queue.getFairShare().getMemory();
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".fairshare.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          return queue.getFairShare().getVirtualCores();
+        }
+      }
+    );
+  }
+
+  @Override
+  public void untrackQueue(String queueName) {
+    trackedQueues.remove(queueName);
+    metrics.remove("variable.queue." + queueName + ".demand.memory");
+    metrics.remove("variable.queue." + queueName + ".demand.vcores");
+    metrics.remove("variable.queue." + queueName + ".usage.memory");
+    metrics.remove("variable.queue." + queueName + ".usage.vcores");
+    metrics.remove("variable.queue." + queueName + ".minshare.memory");
+    metrics.remove("variable.queue." + queueName + ".minshare.vcores");
+    metrics.remove("variable.queue." + queueName + ".maxshare.memory");
+    metrics.remove("variable.queue." + queueName + ".maxshare.vcores");
+    metrics.remove("variable.queue." + queueName + ".fairshare.memory");
+    metrics.remove("variable.queue." + queueName + ".fairshare.vcores");
+  }
+}

+ 58 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/FifoSchedulerMetrics.java

@@ -0,0 +1,58 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import org.apache.hadoop.yarn.api.records.QueueInfo;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo
+        .FifoScheduler;
+
+import com.codahale.metrics.Gauge;
+
+public class FifoSchedulerMetrics extends SchedulerMetrics {
+  
+  public FifoSchedulerMetrics() {
+    super();
+  }
+
+  @Override
+  public void trackQueue(String queueName) {
+    trackedQueues.add(queueName);
+    FifoScheduler fifo = (FifoScheduler) scheduler;
+    // for FifoScheduler, only DEFAULT_QUEUE
+    // here the three parameters doesn't affect results
+    final QueueInfo queue = fifo.getQueueInfo(queueName, false, false);
+    // track currentCapacity, maximumCapacity (always 1.0f)
+    metrics.register("variable.queue." + queueName + ".currentcapacity",
+      new Gauge<Float>() {
+        @Override
+        public Float getValue() {
+          return queue.getCurrentCapacity();
+        }
+      }
+    );
+    metrics.register("variable.queue." + queueName + ".",
+      new Gauge<Float>() {
+        @Override
+        public Float getValue() {
+          return queue.getCurrentCapacity();
+        }
+      }
+    );
+  }
+}

+ 30 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/NodeUpdateSchedulerEventWrapper.java

@@ -0,0 +1,30 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event
+        .NodeUpdateSchedulerEvent;
+
+public class NodeUpdateSchedulerEventWrapper extends NodeUpdateSchedulerEvent {
+  
+  public NodeUpdateSchedulerEventWrapper(NodeUpdateSchedulerEvent event) {
+    super(new RMNodeWrapper(event.getRMNode()));
+  }
+  
+}

+ 141 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/RMNodeWrapper.java

@@ -0,0 +1,141 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import org.apache.hadoop.net.Node;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.NodeId;
+import org.apache.hadoop.yarn.api.records.NodeState;
+import org.apache.hadoop.yarn.api.records.Resource;
+import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse;
+import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
+import org.apache.hadoop.yarn.server.resourcemanager.rmnode
+        .UpdatedContainerInfo;
+
+import java.util.Collections;
+import java.util.List;
+
+public class RMNodeWrapper implements RMNode {
+  private RMNode node;
+  private List<UpdatedContainerInfo> updates;
+  private boolean pulled = false;
+  
+  public RMNodeWrapper(RMNode node) {
+    this.node = node;
+    updates = node.pullContainerUpdates();
+  }
+  
+  @Override
+  public NodeId getNodeID() {
+    return node.getNodeID();
+  }
+
+  @Override
+  public String getHostName() {
+    return node.getHostName();
+  }
+
+  @Override
+  public int getCommandPort() {
+    return node.getCommandPort();
+  }
+
+  @Override
+  public int getHttpPort() {
+    return node.getHttpPort();
+  }
+
+  @Override
+  public String getNodeAddress() {
+    return node.getNodeAddress();
+  }
+
+  @Override
+  public String getHttpAddress() {
+    return node.getHttpAddress();
+  }
+
+  @Override
+  public String getHealthReport() {
+    return node.getHealthReport();
+  }
+
+  @Override
+  public long getLastHealthReportTime() {
+    return node.getLastHealthReportTime();
+  }
+
+  @Override
+  public Resource getTotalCapability() {
+    return node.getTotalCapability();
+  }
+
+  @Override
+  public String getRackName() {
+    return node.getRackName();
+  }
+
+  @Override
+  public Node getNode() {
+    return node.getNode();
+  }
+
+  @Override
+  public NodeState getState() {
+    return node.getState();
+  }
+
+  @Override
+  public List<ContainerId> getContainersToCleanUp() {
+    return node.getContainersToCleanUp();
+  }
+
+  @Override
+  public List<ApplicationId> getAppsToCleanup() {
+    return node.getAppsToCleanup();
+  }
+
+  @Override
+  public void updateNodeHeartbeatResponseForCleanup(
+          NodeHeartbeatResponse nodeHeartbeatResponse) {
+    node.updateNodeHeartbeatResponseForCleanup(nodeHeartbeatResponse);
+  }
+
+  @Override
+  public NodeHeartbeatResponse getLastNodeHeartBeatResponse() {
+    return node.getLastNodeHeartBeatResponse();
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  public List<UpdatedContainerInfo> pullContainerUpdates() {
+    List<UpdatedContainerInfo> list = Collections.EMPTY_LIST;
+    if (! pulled) {
+      list = updates;
+      pulled = true;
+    }
+    return list;    
+  }
+  
+  List<UpdatedContainerInfo> getContainerUpdates() {
+    return updates;
+  }
+
+}

+ 855 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/ResourceSchedulerWrapper.java

@@ -0,0 +1,855 @@
+/**
+ * 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.
+ */
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import org.apache.hadoop.util.ShutdownHookManager;
+import org.apache.hadoop.yarn.sls.SLSRunner;
+import org.apache.hadoop.yarn.sls.conf.SLSConfiguration;
+import org.apache.hadoop.yarn.sls.web.SLSWebApp;
+import com.codahale.metrics.Counter;
+import com.codahale.metrics.CsvReporter;
+import com.codahale.metrics.Gauge;
+import com.codahale.metrics.Histogram;
+import com.codahale.metrics.MetricRegistry;
+import com.codahale.metrics.SlidingWindowReservoir;
+import com.codahale.metrics.Timer;
+
+import org.apache.hadoop.conf.Configurable;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.util.ReflectionUtils;
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.Container;
+import org.apache.hadoop.yarn.api.records.ContainerExitStatus;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.ContainerStatus;
+import org.apache.hadoop.yarn.api.records.NodeId;
+import org.apache.hadoop.yarn.api.records.QueueInfo;
+import org.apache.hadoop.yarn.api.records.QueueUserACLInfo;
+import org.apache.hadoop.yarn.api.records.Resource;
+import org.apache.hadoop.yarn.api.records.ResourceRequest;
+import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
+import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore;
+import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer;
+import org.apache.hadoop.yarn.server.resourcemanager.rmnode
+        .UpdatedContainerInfo;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.Allocation;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueMetrics;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler
+        .ResourceScheduler;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler
+        .SchedulerAppReport;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler
+        .SchedulerNodeReport;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity
+        .CapacityScheduler;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event
+        .AppAddedSchedulerEvent;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event
+        .AppRemovedSchedulerEvent;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event
+        .NodeUpdateSchedulerEvent;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event
+        .SchedulerEvent;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event
+        .SchedulerEventType;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
+        .FairScheduler;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo
+        .FifoScheduler;
+import org.apache.hadoop.yarn.util.resource.Resources;
+import org.apache.log4j.Logger;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+public class ResourceSchedulerWrapper implements ResourceScheduler,
+        Configurable {
+  private static final String EOL = System.getProperty("line.separator");
+  private static final int SAMPLING_SIZE = 60;
+  private ScheduledExecutorService pool;
+  // counters for scheduler allocate/handle operations
+  private Counter schedulerAllocateCounter;
+  private Counter schedulerHandleCounter;
+  private Map<SchedulerEventType, Counter> schedulerHandleCounterMap;
+  // Timers for scheduler allocate/handle operations
+  private Timer schedulerAllocateTimer;
+  private Timer schedulerHandleTimer;
+  private Map<SchedulerEventType, Timer> schedulerHandleTimerMap;
+  private List<Histogram> schedulerHistogramList;
+  private Map<Histogram, Timer> histogramTimerMap;
+  private Lock samplerLock;
+  private Lock queueLock;
+
+  private Configuration conf;
+  private ResourceScheduler scheduler;
+  private Map<ApplicationAttemptId, String> appQueueMap =
+          new ConcurrentHashMap<ApplicationAttemptId, String>();
+  private BufferedWriter jobRuntimeLogBW;
+
+  // Priority of the ResourceSchedulerWrapper shutdown hook.
+  public static final int SHUTDOWN_HOOK_PRIORITY = 30;
+
+  // web app
+  private SLSWebApp web;
+
+  private Map<ContainerId, Resource> preemptionContainerMap =
+          new ConcurrentHashMap<ContainerId, Resource>();
+
+  // metrics
+  private MetricRegistry metrics;
+  private SchedulerMetrics schedulerMetrics;
+  private boolean metricsON;
+  private String metricsOutputDir;
+  private BufferedWriter metricsLogBW;
+  private boolean running = false;
+  private static Map<Class, Class> defaultSchedulerMetricsMap =
+          new HashMap<Class, Class>();
+  static {
+    defaultSchedulerMetricsMap.put(FairScheduler.class,
+            FairSchedulerMetrics.class);
+    defaultSchedulerMetricsMap.put(FifoScheduler.class,
+            FifoSchedulerMetrics.class);
+    defaultSchedulerMetricsMap.put(CapacityScheduler.class,
+            CapacitySchedulerMetrics.class);
+  }
+  // must set by outside
+  private Set<String> queueSet;
+  private Set<String> trackedAppSet;
+
+  public final Logger LOG = Logger.getLogger(ResourceSchedulerWrapper.class);
+
+  public ResourceSchedulerWrapper() {
+    samplerLock = new ReentrantLock();
+    queueLock = new ReentrantLock();
+  }
+
+  @Override
+  public void setConf(Configuration conf) {
+    this.conf = conf;
+    // set scheduler
+    Class<? extends ResourceScheduler> klass =
+            conf.getClass(SLSConfiguration.RM_SCHEDULER, null,
+                    ResourceScheduler.class);
+
+    scheduler = ReflectionUtils.newInstance(klass, conf);
+    // start metrics
+    metricsON = conf.getBoolean(SLSConfiguration.METRICS_SWITCH, true);
+    if (metricsON) {
+      try {
+        initMetrics();
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
+
+    ShutdownHookManager.get().addShutdownHook(new Runnable() {
+      @Override
+      public void run() {
+        try {
+          if (metricsLogBW != null)  {
+            metricsLogBW.write("]");
+            metricsLogBW.close();
+          }
+          if (web != null) {
+            web.stop();
+          }
+          tearDown();
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
+      }
+    }, SHUTDOWN_HOOK_PRIORITY);
+  }
+
+  @Override
+  public Allocation allocate(ApplicationAttemptId attemptId,
+                             List<ResourceRequest> resourceRequests,
+                             List<ContainerId> containerIds,
+                             List<String> strings, List<String> strings2) {
+    if (metricsON) {
+      final Timer.Context context = schedulerAllocateTimer.time();
+      Allocation allocation = null;
+      try {
+        allocation = scheduler.allocate(attemptId, resourceRequests,
+                containerIds, strings, strings2);
+        return allocation;
+      } finally {
+        context.stop();
+        schedulerAllocateCounter.inc();
+        try {
+          updateQueueWithAllocateRequest(allocation, attemptId,
+                  resourceRequests, containerIds);
+        } catch (IOException e) {
+          e.printStackTrace();
+        }
+      }
+    } else {
+      return scheduler.allocate(attemptId,
+              resourceRequests, containerIds, strings, strings2);
+    }
+  }
+
+  @Override
+  public void handle(SchedulerEvent schedulerEvent) {
+    // metrics off
+    if (! metricsON) {
+      scheduler.handle(schedulerEvent);
+      return;
+    }
+    if(!running)    running = true;
+
+    // metrics on
+    Timer.Context handlerTimer = null;
+    Timer.Context operationTimer = null;
+
+    NodeUpdateSchedulerEventWrapper eventWrapper;
+    try {
+      //if (schedulerEvent instanceof NodeUpdateSchedulerEvent) {
+      if (schedulerEvent.getType() == SchedulerEventType.NODE_UPDATE
+              && schedulerEvent instanceof NodeUpdateSchedulerEvent) {
+        eventWrapper = new NodeUpdateSchedulerEventWrapper(
+                (NodeUpdateSchedulerEvent)schedulerEvent);
+        schedulerEvent = eventWrapper;
+        updateQueueWithNodeUpdate(eventWrapper);
+      } else if (schedulerEvent.getType() == SchedulerEventType.APP_REMOVED
+              && schedulerEvent instanceof AppRemovedSchedulerEvent) {
+        // check if having AM Container, update resource usage information
+        AppRemovedSchedulerEvent appRemoveEvent =
+                (AppRemovedSchedulerEvent) schedulerEvent;
+        ApplicationAttemptId appAttemptId =
+                appRemoveEvent.getApplicationAttemptID();
+        String queue = appQueueMap.get(appAttemptId);
+        SchedulerAppReport app = scheduler.getSchedulerAppInfo(appAttemptId);
+        if (! app.getLiveContainers().isEmpty()) {  // have 0 or 1
+          // should have one container which is AM container
+          RMContainer rmc = app.getLiveContainers().iterator().next();
+          updateQueueMetrics(queue,
+                  rmc.getContainer().getResource().getMemory(),
+                  rmc.getContainer().getResource().getVirtualCores());
+        }
+      }
+
+      handlerTimer = schedulerHandleTimer.time();
+      operationTimer = schedulerHandleTimerMap
+              .get(schedulerEvent.getType()).time();
+
+      scheduler.handle(schedulerEvent);
+    } finally {
+      if (handlerTimer != null)     handlerTimer.stop();
+      if (operationTimer != null)   operationTimer.stop();
+      schedulerHandleCounter.inc();
+      schedulerHandleCounterMap.get(schedulerEvent.getType()).inc();
+
+      if (schedulerEvent.getType() == SchedulerEventType.APP_REMOVED
+              && schedulerEvent instanceof AppRemovedSchedulerEvent) {
+        SLSRunner.decreaseRemainingApps();
+        AppRemovedSchedulerEvent appRemoveEvent =
+                (AppRemovedSchedulerEvent) schedulerEvent;
+        ApplicationAttemptId appAttemptId =
+                appRemoveEvent.getApplicationAttemptID();
+        appQueueMap.remove(appRemoveEvent.getApplicationAttemptID());
+      } else if (schedulerEvent.getType() == SchedulerEventType.APP_ADDED
+              && schedulerEvent instanceof AppAddedSchedulerEvent) {
+        AppAddedSchedulerEvent appAddEvent =
+                (AppAddedSchedulerEvent) schedulerEvent;
+        String queueName = appAddEvent.getQueue();
+        appQueueMap.put(appAddEvent.getApplicationAttemptId(), queueName);
+      }
+    }
+  }
+
+  private void updateQueueWithNodeUpdate(
+          NodeUpdateSchedulerEventWrapper eventWrapper) {
+    RMNodeWrapper node = (RMNodeWrapper) eventWrapper.getRMNode();
+    List<UpdatedContainerInfo> containerList = node.getContainerUpdates();
+    for (UpdatedContainerInfo info : containerList) {
+      for (ContainerStatus status : info.getCompletedContainers()) {
+        ContainerId containerId = status.getContainerId();
+        SchedulerAppReport app = scheduler.getSchedulerAppInfo(
+                containerId.getApplicationAttemptId());
+
+        if (app == null) {
+          // this happens for the AM container
+          // The app have already removed when the NM sends the release
+          // information.
+          continue;
+        }
+
+        String queue = appQueueMap.get(containerId.getApplicationAttemptId());
+        int releasedMemory = 0, releasedVCores = 0;
+        if (status.getExitStatus() == ContainerExitStatus.SUCCESS) {
+          for (RMContainer rmc : app.getLiveContainers()) {
+            if (rmc.getContainerId() == containerId) {
+              releasedMemory += rmc.getContainer().getResource().getMemory();
+              releasedVCores += rmc.getContainer()
+                      .getResource().getVirtualCores();
+              break;
+            }
+          }
+        } else if (status.getExitStatus() == ContainerExitStatus.ABORTED) {
+          if (preemptionContainerMap.containsKey(containerId)) {
+            Resource preResource = preemptionContainerMap.get(containerId);
+            releasedMemory += preResource.getMemory();
+            releasedVCores += preResource.getVirtualCores();
+            preemptionContainerMap.remove(containerId);
+          }
+        }
+        // update queue counters
+        updateQueueMetrics(queue, releasedMemory, releasedVCores);
+      }
+    }
+  }
+
+  private void updateQueueWithAllocateRequest(Allocation allocation,
+                        ApplicationAttemptId attemptId,
+                        List<ResourceRequest> resourceRequests,
+                        List<ContainerId> containerIds) throws IOException {
+    // update queue information
+    Resource pendingResource = Resources.createResource(0, 0);
+    Resource allocatedResource = Resources.createResource(0, 0);
+    String queueName = appQueueMap.get(attemptId);
+    // container requested
+    for (ResourceRequest request : resourceRequests) {
+      if (request.getResourceName().equals(ResourceRequest.ANY)) {
+        Resources.addTo(pendingResource,
+                Resources.multiply(request.getCapability(),
+                        request.getNumContainers()));
+      }
+    }
+    // container allocated
+    for (Container container : allocation.getContainers()) {
+      Resources.addTo(allocatedResource, container.getResource());
+      Resources.subtractFrom(pendingResource, container.getResource());
+    }
+    // container released from AM
+    SchedulerAppReport report = scheduler.getSchedulerAppInfo(attemptId);
+    for (ContainerId containerId : containerIds) {
+      Container container = null;
+      for (RMContainer c : report.getLiveContainers()) {
+        if (c.getContainerId().equals(containerId)) {
+          container = c.getContainer();
+          break;
+        }
+      }
+      if (container != null) {
+        // released allocated containers
+        Resources.subtractFrom(allocatedResource, container.getResource());
+      } else {
+        for (RMContainer c : report.getReservedContainers()) {
+          if (c.getContainerId().equals(containerId)) {
+            container = c.getContainer();
+            break;
+          }
+        }
+        if (container != null) {
+          // released reserved containers
+          Resources.subtractFrom(pendingResource, container.getResource());
+        }
+      }
+    }
+    // containers released/preemption from scheduler
+    Set<ContainerId> preemptionContainers = new HashSet<ContainerId>();
+    if (allocation.getContainerPreemptions() != null) {
+      preemptionContainers.addAll(allocation.getContainerPreemptions());
+    }
+    if (allocation.getStrictContainerPreemptions() != null) {
+      preemptionContainers.addAll(allocation.getStrictContainerPreemptions());
+    }
+    if (! preemptionContainers.isEmpty()) {
+      for (ContainerId containerId : preemptionContainers) {
+        if (! preemptionContainerMap.containsKey(containerId)) {
+          Container container = null;
+          for (RMContainer c : report.getLiveContainers()) {
+            if (c.getContainerId().equals(containerId)) {
+              container = c.getContainer();
+              break;
+            }
+          }
+          if (container != null) {
+            preemptionContainerMap.put(containerId, container.getResource());
+          }
+        }
+
+      }
+    }
+
+    // update metrics
+    SortedMap<String, Counter> counterMap = metrics.getCounters();
+    String names[] = new String[]{
+            "counter.queue." + queueName + ".pending.memory",
+            "counter.queue." + queueName + ".pending.cores",
+            "counter.queue." + queueName + ".allocated.memory",
+            "counter.queue." + queueName + ".allocated.cores"};
+    int values[] = new int[]{pendingResource.getMemory(),
+            pendingResource.getVirtualCores(),
+            allocatedResource.getMemory(), allocatedResource.getVirtualCores()};
+    for (int i = names.length - 1; i >= 0; i --) {
+      if (! counterMap.containsKey(names[i])) {
+        metrics.counter(names[i]);
+        counterMap = metrics.getCounters();
+      }
+      counterMap.get(names[i]).inc(values[i]);
+    }
+
+    queueLock.lock();
+    try {
+      if (! schedulerMetrics.isTracked(queueName)) {
+        schedulerMetrics.trackQueue(queueName);
+      }
+    } finally {
+      queueLock.unlock();
+    }
+  }
+
+  private void tearDown() throws IOException {
+    // close job runtime writer
+    if (jobRuntimeLogBW != null) {
+      jobRuntimeLogBW.close();
+    }
+    // shut pool
+    if (pool != null)  pool.shutdown();
+  }
+
+  @SuppressWarnings("unchecked")
+  private void initMetrics() throws Exception {
+    metrics = new MetricRegistry();
+    // configuration
+    metricsOutputDir = conf.get(SLSConfiguration.METRICS_OUTPUT_DIR);
+    int metricsWebAddressPort = conf.getInt(
+            SLSConfiguration.METRICS_WEB_ADDRESS_PORT,
+            SLSConfiguration.METRICS_WEB_ADDRESS_PORT_DEFAULT);
+    // create SchedulerMetrics for current scheduler
+    String schedulerMetricsType = conf.get(scheduler.getClass().getName());
+    Class schedulerMetricsClass = schedulerMetricsType == null?
+            defaultSchedulerMetricsMap.get(scheduler.getClass()) :
+            Class.forName(schedulerMetricsType);
+    schedulerMetrics = (SchedulerMetrics)ReflectionUtils
+            .newInstance(schedulerMetricsClass, new Configuration());
+    schedulerMetrics.init(scheduler, metrics);
+
+    // register various metrics
+    registerJvmMetrics();
+    registerClusterResourceMetrics();
+    registerContainerAppNumMetrics();
+    registerSchedulerMetrics();
+
+    // .csv output
+    initMetricsCSVOutput();
+
+    // start web app to provide real-time tracking
+    web = new SLSWebApp(this, metricsWebAddressPort);
+    web.start();
+
+    // a thread to update histogram timer
+    pool = new ScheduledThreadPoolExecutor(2);
+    pool.scheduleAtFixedRate(new HistogramsRunnable(), 0, 1000,
+            TimeUnit.MILLISECONDS);
+
+    // a thread to output metrics for real-tiem tracking
+    pool.scheduleAtFixedRate(new MetricsLogRunnable(), 0, 1000,
+            TimeUnit.MILLISECONDS);
+
+    // application running information
+    jobRuntimeLogBW = new BufferedWriter(
+            new FileWriter(metricsOutputDir + "/jobruntime.csv"));
+    jobRuntimeLogBW.write("JobID,real_start_time,real_end_time," +
+            "simulate_start_time,simulate_end_time" + EOL);
+    jobRuntimeLogBW.flush();
+  }
+
+  private void registerJvmMetrics() {
+    // add JVM gauges
+    metrics.register("variable.jvm.free.memory",
+      new Gauge<Long>() {
+        @Override
+        public Long getValue() {
+          return Runtime.getRuntime().freeMemory();
+        }
+      }
+    );
+    metrics.register("variable.jvm.max.memory",
+      new Gauge<Long>() {
+        @Override
+        public Long getValue() {
+          return Runtime.getRuntime().maxMemory();
+        }
+      }
+    );
+    metrics.register("variable.jvm.total.memory",
+      new Gauge<Long>() {
+        @Override
+        public Long getValue() {
+          return Runtime.getRuntime().totalMemory();
+        }
+      }
+    );
+  }
+
+  private void registerClusterResourceMetrics() {
+    metrics.register("variable.cluster.allocated.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          if(scheduler == null || scheduler.getRootQueueMetrics() == null) {
+            return 0;
+          } else {
+            return scheduler.getRootQueueMetrics().getAllocatedMB();
+          }
+        }
+      }
+    );
+    metrics.register("variable.cluster.allocated.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          if(scheduler == null || scheduler.getRootQueueMetrics() == null) {
+            return 0;
+          } else {
+            return scheduler.getRootQueueMetrics().getAllocatedVirtualCores();
+          }
+        }
+      }
+    );
+    metrics.register("variable.cluster.available.memory",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          if(scheduler == null || scheduler.getRootQueueMetrics() == null) {
+            return 0;
+          } else {
+            return scheduler.getRootQueueMetrics().getAvailableMB();
+          }
+        }
+      }
+    );
+    metrics.register("variable.cluster.available.vcores",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          if(scheduler == null || scheduler.getRootQueueMetrics() == null) {
+            return 0;
+          } else {
+            return scheduler.getRootQueueMetrics().getAvailableVirtualCores();
+          }
+        }
+      }
+    );
+  }
+
+  private void registerContainerAppNumMetrics() {
+    metrics.register("variable.running.application",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          if(scheduler == null || scheduler.getRootQueueMetrics() == null) {
+            return 0;
+          } else {
+            return scheduler.getRootQueueMetrics().getAppsRunning();
+          }
+        }
+      }
+    );
+    metrics.register("variable.running.container",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          if(scheduler == null || scheduler.getRootQueueMetrics() == null) {
+            return 0;
+          } else {
+            return scheduler.getRootQueueMetrics().getAllocatedContainers();
+          }
+        }
+      }
+    );
+  }
+
+  private void registerSchedulerMetrics() {
+    samplerLock.lock();
+    try {
+      // counters for scheduler operations
+      schedulerAllocateCounter = metrics.counter(
+              "counter.scheduler.operation.allocate");
+      schedulerHandleCounter = metrics.counter(
+              "counter.scheduler.operation.handle");
+      schedulerHandleCounterMap = new HashMap<SchedulerEventType, Counter>();
+      for (SchedulerEventType e : SchedulerEventType.values()) {
+        Counter counter = metrics.counter(
+                "counter.scheduler.operation.handle." + e);
+        schedulerHandleCounterMap.put(e, counter);
+      }
+      // timers for scheduler operations
+      int timeWindowSize = conf.getInt(
+              SLSConfiguration.METRICS_TIMER_WINDOW_SIZE,
+              SLSConfiguration.METRICS_TIMER_WINDOW_SIZE_DEFAULT);
+      schedulerAllocateTimer = new Timer(
+              new SlidingWindowReservoir(timeWindowSize));
+      schedulerHandleTimer = new Timer(
+              new SlidingWindowReservoir(timeWindowSize));
+      schedulerHandleTimerMap = new HashMap<SchedulerEventType, Timer>();
+      for (SchedulerEventType e : SchedulerEventType.values()) {
+        Timer timer = new Timer(new SlidingWindowReservoir(timeWindowSize));
+        schedulerHandleTimerMap.put(e, timer);
+      }
+      // histogram for scheduler operations (Samplers)
+      schedulerHistogramList = new ArrayList<Histogram>();
+      histogramTimerMap = new HashMap<Histogram, Timer>();
+      Histogram schedulerAllocateHistogram = new Histogram(
+              new SlidingWindowReservoir(SAMPLING_SIZE));
+      metrics.register("sampler.scheduler.operation.allocate.timecost",
+              schedulerAllocateHistogram);
+      schedulerHistogramList.add(schedulerAllocateHistogram);
+      histogramTimerMap.put(schedulerAllocateHistogram, schedulerAllocateTimer);
+      Histogram schedulerHandleHistogram = new Histogram(
+              new SlidingWindowReservoir(SAMPLING_SIZE));
+      metrics.register("sampler.scheduler.operation.handle.timecost",
+              schedulerHandleHistogram);
+      schedulerHistogramList.add(schedulerHandleHistogram);
+      histogramTimerMap.put(schedulerHandleHistogram, schedulerHandleTimer);
+      for (SchedulerEventType e : SchedulerEventType.values()) {
+        Histogram histogram = new Histogram(
+                new SlidingWindowReservoir(SAMPLING_SIZE));
+        metrics.register(
+                "sampler.scheduler.operation.handle." + e + ".timecost",
+                histogram);
+        schedulerHistogramList.add(histogram);
+        histogramTimerMap.put(histogram, schedulerHandleTimerMap.get(e));
+      }
+    } finally {
+      samplerLock.unlock();
+    }
+  }
+
+  private void initMetricsCSVOutput() {
+    int timeIntervalMS = conf.getInt(
+            SLSConfiguration.METRICS_RECORD_INTERVAL_MS,
+            SLSConfiguration.METRICS_RECORD_INTERVAL_MS_DEFAULT);
+    File dir = new File(metricsOutputDir + "/metrics");
+    if(! dir.exists()
+            && ! dir.mkdirs()) {
+      LOG.error("Cannot create directory " + dir.getAbsoluteFile());
+    }
+    final CsvReporter reporter = CsvReporter.forRegistry(metrics)
+            .formatFor(Locale.US)
+            .convertRatesTo(TimeUnit.SECONDS)
+            .convertDurationsTo(TimeUnit.MILLISECONDS)
+            .build(new File(metricsOutputDir + "/metrics"));
+    reporter.start(timeIntervalMS, TimeUnit.MILLISECONDS);
+  }
+
+  class HistogramsRunnable implements Runnable {
+    @Override
+    public void run() {
+      samplerLock.lock();
+      try {
+        for (Histogram histogram : schedulerHistogramList) {
+          Timer timer = histogramTimerMap.get(histogram);
+          histogram.update((int) timer.getSnapshot().getMean());
+        }
+      } finally {
+        samplerLock.unlock();
+      }
+    }
+  }
+
+  class MetricsLogRunnable implements Runnable {
+    private boolean firstLine = true;
+    public MetricsLogRunnable() {
+      try {
+        metricsLogBW = new BufferedWriter(
+                new FileWriter(metricsOutputDir + "/realtimetrack.json"));
+        metricsLogBW.write("[");
+      } catch (IOException e) {
+        e.printStackTrace();
+      }
+    }
+
+    @Override
+    public void run() {
+      if(running) {
+        // all WebApp to get real tracking json
+        String metrics = web.generateRealTimeTrackingMetrics();
+        // output
+        try {
+          if(firstLine) {
+            metricsLogBW.write(metrics + EOL);
+            firstLine = false;
+          } else {
+            metricsLogBW.write("," + metrics + EOL);
+          }
+          metricsLogBW.flush();
+        } catch (IOException e) {
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+
+  // the following functions are used by AMSimulator
+  public void addAMRuntime(ApplicationId appId,
+                           long traceStartTimeMS, long traceEndTimeMS,
+                           long simulateStartTimeMS, long simulateEndTimeMS) {
+
+    try {
+      // write job runtime information
+      StringBuilder sb = new StringBuilder();
+      sb.append(appId).append(",").append(traceStartTimeMS).append(",")
+              .append(traceEndTimeMS).append(",").append(simulateStartTimeMS)
+              .append(",").append(simulateEndTimeMS);
+      jobRuntimeLogBW.write(sb.toString() + EOL);
+      jobRuntimeLogBW.flush();
+    } catch (IOException e) {
+      e.printStackTrace();
+    }
+  }
+
+  private void updateQueueMetrics(String queue,
+                                  int releasedMemory, int releasedVCores) {
+    // update queue counters
+    SortedMap<String, Counter> counterMap = metrics.getCounters();
+    if (releasedMemory != 0) {
+      String name = "counter.queue." + queue + ".allocated.memory";
+      if (! counterMap.containsKey(name)) {
+        metrics.counter(name);
+        counterMap = metrics.getCounters();
+      }
+      counterMap.get(name).inc(-releasedMemory);
+    }
+    if (releasedVCores != 0) {
+      String name = "counter.queue." + queue + ".allocated.cores";
+      if (! counterMap.containsKey(name)) {
+        metrics.counter(name);
+        counterMap = metrics.getCounters();
+      }
+      counterMap.get(name).inc(-releasedVCores);
+    }
+  }
+
+  public void setQueueSet(Set<String> queues) {
+    this.queueSet = queues;
+  }
+
+  public Set<String> getQueueSet() {
+    return this.queueSet;
+  }
+
+  public void setTrackedAppSet(Set<String> apps) {
+    this.trackedAppSet = apps;
+  }
+
+  public Set<String> getTrackedAppSet() {
+    return this.trackedAppSet;
+  }
+
+  public MetricRegistry getMetrics() {
+    return metrics;
+  }
+
+  public SchedulerMetrics getSchedulerMetrics() {
+    return schedulerMetrics;
+  }
+
+  // API open to out classes
+  public void addTrackedApp(ApplicationAttemptId appAttemptId,
+                            String oldAppId) {
+    if (metricsON) {
+      schedulerMetrics.trackApp(appAttemptId, oldAppId);
+    }
+  }
+
+  public void removeTrackedApp(ApplicationAttemptId appAttemptId,
+                               String oldAppId) {
+    if (metricsON) {
+      schedulerMetrics.untrackApp(appAttemptId, oldAppId);
+    }
+  }
+
+  @Override
+  public Configuration getConf() {
+    return conf;
+  }
+
+  @Override
+  public void reinitialize(Configuration entries, RMContext rmContext)
+          throws IOException {
+    scheduler.reinitialize(entries, rmContext);
+  }
+
+  @Override
+  public void recover(RMStateStore.RMState rmState) throws Exception {
+    scheduler.recover(rmState);
+  }
+
+  @Override
+  public QueueInfo getQueueInfo(String s, boolean b, boolean b2)
+          throws IOException {
+    return scheduler.getQueueInfo(s, b, b2);
+  }
+
+  @Override
+  public List<QueueUserACLInfo> getQueueUserAclInfo() {
+    return scheduler.getQueueUserAclInfo();
+  }
+
+  @Override
+  public Resource getMinimumResourceCapability() {
+    return scheduler.getMinimumResourceCapability();
+  }
+
+  @Override
+  public Resource getMaximumResourceCapability() {
+    return scheduler.getMaximumResourceCapability();
+  }
+
+  @Override
+  public int getNumClusterNodes() {
+    return scheduler.getNumClusterNodes();
+  }
+
+  @Override
+  public SchedulerNodeReport getNodeReport(NodeId nodeId) {
+    return scheduler.getNodeReport(nodeId);
+  }
+
+  @Override
+  public SchedulerAppReport getSchedulerAppInfo(
+          ApplicationAttemptId attemptId) {
+    return scheduler.getSchedulerAppInfo(attemptId);
+  }
+
+  @Override
+  public QueueMetrics getRootQueueMetrics() {
+    return scheduler.getRootQueueMetrics();
+  }
+}

+ 100 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/SchedulerMetrics.java

@@ -0,0 +1,100 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler
+        .ResourceScheduler;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler
+        .SchedulerAppReport;
+
+import com.codahale.metrics.Gauge;
+import com.codahale.metrics.MetricRegistry;
+
+public abstract class SchedulerMetrics {
+  protected ResourceScheduler scheduler;
+  protected Set<String> trackedQueues;
+  protected MetricRegistry metrics;
+  protected Set<String> appTrackedMetrics;
+  protected Set<String> queueTrackedMetrics;
+  
+  public SchedulerMetrics() {
+    appTrackedMetrics = new HashSet<String>();
+    appTrackedMetrics.add("live.containers");
+    appTrackedMetrics.add("reserved.containers");
+    queueTrackedMetrics = new HashSet<String>();
+  }
+  
+  public void init(ResourceScheduler scheduler, MetricRegistry metrics) {
+    this.scheduler = scheduler;
+    this.trackedQueues = new HashSet<String>();
+    this.metrics = metrics;
+  }
+  
+  public void trackApp(final ApplicationAttemptId appAttemptId,
+                       String oldAppId) {
+    metrics.register("variable.app." + oldAppId + ".live.containers",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          SchedulerAppReport app = scheduler.getSchedulerAppInfo(appAttemptId);
+          return app.getLiveContainers().size();
+        }
+      }
+    );
+    metrics.register("variable.app." + oldAppId + ".reserved.containers",
+      new Gauge<Integer>() {
+        @Override
+        public Integer getValue() {
+          SchedulerAppReport app = scheduler.getSchedulerAppInfo(appAttemptId);
+          return app.getReservedContainers().size();
+        }
+      }
+    );
+  }
+  
+  public void untrackApp(ApplicationAttemptId appAttemptId,
+      String oldAppId) {
+    for (String m : appTrackedMetrics) {
+      metrics.remove("variable.app." + oldAppId + "." + m);
+    }
+  }
+
+  public abstract void trackQueue(String queueName);
+  
+  public void untrackQueue(String queueName) {
+    for (String m : queueTrackedMetrics) {
+      metrics.remove("variable.queue." + queueName + "." + m);
+    }
+  }
+  
+  public boolean isTracked(String queueName) {
+    return trackedQueues.contains(queueName);
+  }
+  
+  public Set<String> getAppTrackedMetrics() {
+    return appTrackedMetrics;
+  }
+  public Set<String> getQueueTrackedMetrics() {
+    return queueTrackedMetrics;
+  }
+}

+ 183 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/TaskRunner.java

@@ -0,0 +1,183 @@
+/**
+ * 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.
+ */
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.Queue;
+import java.util.concurrent.DelayQueue;
+import java.util.concurrent.Delayed;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.hadoop.yarn.exceptions.YarnException;
+
+public class TaskRunner {
+  public abstract static class Task implements Runnable, Delayed {
+    private long start;
+    private long end;
+    private long nextRun;
+    private long startTime;
+    private long endTime;
+    private long repeatInterval;
+    private Queue<Task> queue;
+
+    public Task(){}
+    
+    //values in milliseconds, start/end are milliseconds from now
+    public void init(long startTime, long endTime, long repeatInterval) {
+      if (endTime - startTime < 0) {
+        throw new IllegalArgumentException(MessageFormat.format(
+          "endTime[{0}] cannot be smaller than startTime[{1}]", endTime, 
+          startTime));
+      }
+      if (repeatInterval < 0) {
+        throw new IllegalArgumentException(MessageFormat.format(
+          "repeatInterval[{0}] cannot be less than 1", repeatInterval));
+      }
+      if ((endTime - startTime) % repeatInterval != 0) {
+        throw new IllegalArgumentException(MessageFormat.format(
+          "Invalid parameters: (endTime[{0}] - startTime[{1}]) " +
+                  "% repeatInterval[{2}] != 0",
+          endTime, startTime, repeatInterval));        
+      }
+      start = startTime;
+      end = endTime;
+      this.repeatInterval = repeatInterval;
+    }
+
+    private void timeRebase(long now) {
+      startTime = now + start;
+      endTime = now + end;
+      this.nextRun = startTime;
+    }
+    
+    //values in milliseconds, start is milliseconds from now
+    //it only executes firstStep()
+    public void init(long startTime) {
+      init(startTime, startTime, 1);
+    }
+
+    private void setQueue(Queue<Task> queue) {
+      this.queue = queue;
+    }
+
+    @Override
+    public final void run() {
+      try {
+        if (nextRun == startTime) {
+          firstStep();
+          nextRun += repeatInterval;
+          if (nextRun <= endTime) {
+            queue.add(this);          
+          }
+        } else if (nextRun < endTime) {
+          middleStep();
+          nextRun += repeatInterval;
+          queue.add(this);
+        } else {
+          lastStep();
+        }
+      } catch (YarnException e) {
+        e.printStackTrace();
+      } catch (IOException e) {
+        e.printStackTrace();
+      } catch (InterruptedException e) {
+        e.printStackTrace();
+      }
+    }
+
+    @Override
+    public long getDelay(TimeUnit unit) {
+      return unit.convert(nextRun - System.currentTimeMillis(),
+        TimeUnit.MILLISECONDS);
+    }
+
+    @Override
+    public int compareTo(Delayed o) {
+      if (!(o instanceof Task)) {
+        throw new IllegalArgumentException("Parameter must be a Task instance");
+      }
+      Task other = (Task) o;
+      return (int) Math.signum(nextRun - other.nextRun);
+    }
+
+
+    public abstract void firstStep()
+            throws YarnException, IOException, InterruptedException;
+
+    public abstract void middleStep()
+            throws YarnException, InterruptedException, IOException;
+
+    public abstract void lastStep() throws YarnException;
+
+    public void setEndTime(long et) {
+      endTime = et;
+    }
+  }
+
+  private DelayQueue queue;
+  private int threadPoolSize;
+  private ThreadPoolExecutor executor;
+  private long startTimeMS = 0;
+  
+  public TaskRunner() {
+    queue = new DelayQueue();
+  }
+
+  public void setQueueSize(int threadPoolSize) {
+    this.threadPoolSize = threadPoolSize;
+  }
+
+  @SuppressWarnings("unchecked")
+  public void start() {
+    if (executor != null) {
+      throw new IllegalStateException("Already started");
+    }
+    DelayQueue preStartQueue = queue;
+
+    queue = new DelayQueue();
+    executor = new ThreadPoolExecutor(threadPoolSize, threadPoolSize, 0,
+      TimeUnit.MILLISECONDS, queue);
+    executor.prestartAllCoreThreads();
+
+    startTimeMS = System.currentTimeMillis();
+    for (Object d : preStartQueue) {
+      schedule((Task) d, startTimeMS);
+    }
+  }
+  
+  public void stop() {
+    executor.shutdownNow();
+  }
+
+  @SuppressWarnings("unchecked")
+  private void schedule(Task task, long timeNow) {
+    task.timeRebase(timeNow);
+    task.setQueue(queue);
+    queue.add(task);
+  }
+
+  public void schedule(Task task) {
+    schedule(task, System.currentTimeMillis());
+  }
+
+  public long getStartTimeMS() {
+    return this.startTimeMS;
+  }
+}

+ 133 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/utils/SLSUtils.java

@@ -0,0 +1,133 @@
+/**
+ * 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.
+ */
+package org.apache.hadoop.yarn.sls.utils;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.tools.rumen.JobTraceReader;
+import org.apache.hadoop.tools.rumen.LoggedJob;
+import org.apache.hadoop.tools.rumen.LoggedTask;
+import org.apache.hadoop.tools.rumen.LoggedTaskAttempt;
+import org.codehaus.jackson.JsonFactory;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.List;
+import java.util.Iterator;
+
+public class SLSUtils {
+
+  public static String[] getRackHostName(String hostname) {
+    hostname = hostname.substring(1);
+    return hostname.split("/");
+  }
+
+  /**
+   * parse the rumen trace file, return each host name
+   */
+  public static Set<String> parseNodesFromRumenTrace(String jobTrace)
+          throws IOException {
+    Set<String> nodeSet = new HashSet<String>();
+
+    File fin = new File(jobTrace);
+    Configuration conf = new Configuration();
+    conf.set("fs.defaultFS", "file:///");
+    JobTraceReader reader = new JobTraceReader(
+            new Path(fin.getAbsolutePath()), conf);
+    try {
+      LoggedJob job = null;
+      while ((job = reader.getNext()) != null) {
+        for(LoggedTask mapTask : job.getMapTasks()) {
+          // select the last attempt
+          LoggedTaskAttempt taskAttempt = mapTask.getAttempts()
+                  .get(mapTask.getAttempts().size() - 1);
+          nodeSet.add(taskAttempt.getHostName().getValue());
+        }
+        for(LoggedTask reduceTask : job.getReduceTasks()) {
+          LoggedTaskAttempt taskAttempt = reduceTask.getAttempts()
+                  .get(reduceTask.getAttempts().size() - 1);
+          nodeSet.add(taskAttempt.getHostName().getValue());
+        }
+      }
+    } finally {
+      reader.close();
+    }
+
+    return nodeSet;
+  }
+
+  /**
+   * parse the sls trace file, return each host name
+   */
+  public static Set<String> parseNodesFromSLSTrace(String jobTrace)
+          throws IOException {
+    Set<String> nodeSet = new HashSet<String>();
+    JsonFactory jsonF = new JsonFactory();
+    ObjectMapper mapper = new ObjectMapper();
+    Reader input = new FileReader(jobTrace);
+    try {
+      Iterator<Map> i = mapper.readValues(
+              jsonF.createJsonParser(input), Map.class);
+      while (i.hasNext()) {
+        Map jsonE = i.next();
+        List tasks = (List) jsonE.get("job.tasks");
+        for (Object o : tasks) {
+          Map jsonTask = (Map) o;
+          String hostname = jsonTask.get("container.host").toString();
+          nodeSet.add(hostname);
+        }
+      }
+    } finally {
+      input.close();
+    }
+    return nodeSet;
+  }
+
+  /**
+   * parse the input node file, return each host name
+   */
+  public static Set<String> parseNodesFromNodeFile(String nodeFile)
+          throws IOException {
+    Set<String> nodeSet = new HashSet<String>();
+    JsonFactory jsonF = new JsonFactory();
+    ObjectMapper mapper = new ObjectMapper();
+    Reader input = new FileReader(nodeFile);
+    try {
+      Iterator<Map> i = mapper.readValues(
+              jsonF.createJsonParser(input), Map.class);
+      while (i.hasNext()) {
+        Map jsonE = i.next();
+        String rack = "/" + jsonE.get("rack");
+        List tasks = (List) jsonE.get("nodes");
+        for (Object o : tasks) {
+          Map jsonNode = (Map) o;
+          nodeSet.add(rack + "/" + jsonNode.get("node"));
+        }
+      }
+    } finally {
+      input.close();
+    }
+    return nodeSet;
+  }
+}

+ 527 - 0
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/web/SLSWebApp.java

@@ -0,0 +1,527 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.web;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event
+        .SchedulerEventType;
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.AbstractHandler;
+import org.mortbay.jetty.Request;
+
+import org.apache.hadoop.yarn.sls.SLSRunner;
+import org.apache.hadoop.yarn.sls.scheduler.FairSchedulerMetrics;
+import org.apache.hadoop.yarn.sls.scheduler.ResourceSchedulerWrapper;
+import org.apache.hadoop.yarn.sls.scheduler.SchedulerMetrics;
+import com.codahale.metrics.Counter;
+import com.codahale.metrics.Gauge;
+import com.codahale.metrics.Histogram;
+import com.codahale.metrics.MetricRegistry;
+import org.mortbay.jetty.handler.ResourceHandler;
+
+public class SLSWebApp extends HttpServlet {
+  private static final long serialVersionUID = 1905162041950251407L;
+  private transient Server server;
+  private transient ResourceSchedulerWrapper wrapper;
+  private transient MetricRegistry metrics;
+  private transient SchedulerMetrics schedulerMetrics;
+  // metrics objects
+  private transient Gauge jvmFreeMemoryGauge;
+  private transient Gauge jvmMaxMemoryGauge;
+  private transient Gauge jvmTotalMemoryGauge;
+  private transient Gauge numRunningAppsGauge;
+  private transient Gauge numRunningContainersGauge;
+  private transient Gauge allocatedMemoryGauge;
+  private transient Gauge allocatedVCoresGauge;
+  private transient Gauge availableMemoryGauge;
+  private transient Gauge availableVCoresGauge;
+  private transient Histogram allocateTimecostHistogram;
+  private transient Histogram handleTimecostHistogram;
+  private Map<SchedulerEventType, Histogram> handleOperTimecostHistogramMap;
+  private Map<String, Counter> queueAllocatedMemoryCounterMap;
+  private Map<String, Counter> queueAllocatedVCoresCounterMap;
+  private int port;
+  private int ajaxUpdateTimeMS = 1000;
+  // html page templates
+  private String simulateInfoTemplate;
+  private String simulateTemplate;
+  private String trackTemplate;
+
+  {
+    // load templates
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    try {
+      simulateInfoTemplate = FileUtils.readFileToString(new File(
+              cl.getResource("simulate.info.html.template").getFile()));
+      simulateTemplate = FileUtils.readFileToString(new File(
+              cl.getResource("simulate.html.template").getFile()));
+      trackTemplate = FileUtils.readFileToString(new File(
+              cl.getResource("track.html.template").getFile()));
+    } catch (IOException e) {
+      e.printStackTrace();
+    }
+  }
+
+  public SLSWebApp(ResourceSchedulerWrapper wrapper, int metricsAddressPort) {
+    this.wrapper = wrapper;
+    metrics = wrapper.getMetrics();
+    handleOperTimecostHistogramMap =
+            new HashMap<SchedulerEventType, Histogram>();
+    queueAllocatedMemoryCounterMap = new HashMap<String, Counter>();
+    queueAllocatedVCoresCounterMap = new HashMap<String, Counter>();
+    schedulerMetrics = wrapper.getSchedulerMetrics();
+    port = metricsAddressPort;
+  }
+
+  public void start() throws Exception {
+    // static files
+    final ResourceHandler staticHandler = new ResourceHandler();
+    staticHandler.setResourceBase("html");
+
+    Handler handler = new AbstractHandler() {
+      @Override
+      public void handle(String target, HttpServletRequest request,
+                         HttpServletResponse response, int dispatch) {
+        try{
+          // timeunit
+          int timeunit = 1000;   // second, divide millionsecond / 1000
+          String timeunitLabel = "second";
+          if (request.getParameter("u")!= null &&
+                  request.getParameter("u").equalsIgnoreCase("m")) {
+            timeunit = 1000 * 60;
+            timeunitLabel = "minute";
+          }
+
+          // http request
+          if (target.equals("/")) {
+            printPageIndex(request, response);
+          } else if (target.equals("/simulate")) {
+            printPageSimulate(request, response, timeunit, timeunitLabel);
+          } else if (target.equals("/track")) {
+            printPageTrack(request, response, timeunit, timeunitLabel);
+          } else
+            // js/css request
+            if (target.startsWith("/js") || target.startsWith("/css")) {
+              response.setCharacterEncoding("utf-8");
+              staticHandler.handle(target, request, response, dispatch);
+            } else
+              // json request
+              if (target.equals("/simulateMetrics")) {
+                printJsonMetrics(request, response);
+              } else if (target.equals("/trackMetrics")) {
+                printJsonTrack(request, response);
+              }
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
+      }
+    };
+
+    server = new Server(port);
+    server.setHandler(handler);
+
+    server.start();
+  }
+
+  public void stop() throws Exception {
+    if (server != null) {
+      server.stop();
+    }
+  }
+
+  /**
+   * index html page, show simulation info
+   * path ""
+   * @param request http request
+   * @param response http response
+   * @throws java.io.IOException
+   */
+  private void printPageIndex(HttpServletRequest request,
+                              HttpServletResponse response) throws IOException {
+    response.setContentType("text/html");
+    response.setStatus(HttpServletResponse.SC_OK);
+
+    String simulateInfo;
+    if (SLSRunner.simulateInfoMap.isEmpty()) {
+      String empty = "<tr><td colspan='2' align='center'>" +
+              "No information available</td></tr>";
+      simulateInfo = MessageFormat.format(simulateInfoTemplate, empty);
+    } else {
+      StringBuilder info = new StringBuilder();
+      for (Map.Entry<String, Object> entry :
+              SLSRunner.simulateInfoMap.entrySet()) {
+        info.append("<tr>");
+        info.append("<td class='td1'>").append(entry.getKey()).append("</td>");
+        info.append("<td class='td2'>").append(entry.getValue())
+                .append("</td>");
+        info.append("</tr>");
+      }
+      simulateInfo =
+              MessageFormat.format(simulateInfoTemplate, info.toString());
+    }
+    response.getWriter().println(simulateInfo);
+
+    ((Request) request).setHandled(true);
+  }
+
+  /**
+   * simulate html page, show several real-runtime chart
+   * path "/simulate"
+   * use d3.js
+   * @param request http request
+   * @param response http response
+   * @throws java.io.IOException
+   */
+  private void printPageSimulate(HttpServletRequest request,
+                                 HttpServletResponse response, int timeunit,
+                                 String timeunitLabel)
+          throws IOException {
+    response.setContentType("text/html");
+    response.setStatus(HttpServletResponse.SC_OK);
+
+    // queues {0}
+    Set<String> queues = wrapper.getQueueSet();
+    StringBuilder queueInfo = new StringBuilder();
+
+    int i = 0;
+    for (String queue : queues) {
+      queueInfo.append("legends[4][").append(i).append("] = 'queue.")
+              .append(queue).append(".allocated.memory';");
+      queueInfo.append("legends[5][").append(i).append("] = 'queue.")
+              .append(queue).append(".allocated.vcores';");
+      i ++;
+    }
+
+    // time unit label {1}
+    // time unit {2}
+    // ajax update time interval {3}
+    String simulateInfo = MessageFormat.format(simulateTemplate,
+            queueInfo.toString(), timeunitLabel, "" + timeunit,
+            "" + ajaxUpdateTimeMS);
+    response.getWriter().println(simulateInfo);
+
+    ((Request) request).setHandled(true);
+  }
+
+  /**
+   * html page for tracking one queue or job
+   * use d3.js
+   * @param request http request
+   * @param response http response
+   * @throws java.io.IOException
+   */
+  private void printPageTrack(HttpServletRequest request,
+                               HttpServletResponse response, int timeunit,
+                               String timeunitLabel)
+          throws IOException {
+    response.setContentType("text/html");
+    response.setStatus(HttpServletResponse.SC_OK);
+
+    // tracked queues {0}
+    StringBuilder trackedQueueInfo = new StringBuilder();
+    Set<String> trackedQueues = wrapper.getQueueSet();
+    for(String queue : trackedQueues) {
+      trackedQueueInfo.append("<option value='Queue ").append(queue)
+              .append("'>").append(queue).append("</option>");
+    }
+
+    // tracked apps {1}
+    StringBuilder trackedAppInfo = new StringBuilder();
+    Set<String> trackedApps = wrapper.getTrackedAppSet();
+    for(String job : trackedApps) {
+      trackedAppInfo.append("<option value='Job ").append(job)
+              .append("'>").append(job).append("</option>");
+    }
+
+    // timeunit label {2}
+    // time unit {3}
+    // ajax update time {4}
+    // final html
+    String trackInfo = MessageFormat.format(trackTemplate,
+            trackedQueueInfo.toString(), trackedAppInfo.toString(),
+            timeunitLabel, "" + timeunit, "" + ajaxUpdateTimeMS);
+    response.getWriter().println(trackInfo);
+
+    ((Request) request).setHandled(true);
+  }
+
+  /**
+   * package metrics information in a json and return
+   * @param request http request
+   * @param response http response
+   * @throws java.io.IOException
+   */
+  private void printJsonMetrics(HttpServletRequest request,
+                                HttpServletResponse response)
+          throws IOException {
+    response.setContentType("text/json");
+    response.setStatus(HttpServletResponse.SC_OK);
+
+    response.getWriter().println(generateRealTimeTrackingMetrics());
+    ((Request) request).setHandled(true);
+  }
+
+  public String generateRealTimeTrackingMetrics() {
+    // JVM
+    double jvmFreeMemoryGB, jvmMaxMemoryGB, jvmTotalMemoryGB;
+    if (jvmFreeMemoryGauge == null &&
+            metrics.getGauges().containsKey("variable.jvm.free.memory")) {
+      jvmFreeMemoryGauge = metrics.getGauges().get("variable.jvm.free.memory");
+    }
+    if (jvmMaxMemoryGauge == null &&
+            metrics.getGauges().containsKey("variable.jvm.max.memory")) {
+      jvmMaxMemoryGauge = metrics.getGauges().get("variable.jvm.max.memory");
+    }
+    if (jvmTotalMemoryGauge == null &&
+            metrics.getGauges().containsKey("variable.jvm.total.memory")) {
+      jvmTotalMemoryGauge = metrics.getGauges()
+              .get("variable.jvm.total.memory");
+    }
+    jvmFreeMemoryGB = jvmFreeMemoryGauge == null ? 0 :
+            Double.parseDouble(jvmFreeMemoryGauge.getValue().toString())
+                    /1024/1024/1024;
+    jvmMaxMemoryGB = jvmMaxMemoryGauge == null ? 0 :
+            Double.parseDouble(jvmMaxMemoryGauge.getValue().toString())
+                    /1024/1024/1024;
+    jvmTotalMemoryGB = jvmTotalMemoryGauge == null ? 0 :
+            Double.parseDouble(jvmTotalMemoryGauge.getValue().toString())
+                    /1024/1024/1024;
+
+    // number of running applications/containers
+    String numRunningApps, numRunningContainers;
+    if (numRunningAppsGauge == null &&
+            metrics.getGauges().containsKey("variable.running.application")) {
+      numRunningAppsGauge =
+              metrics.getGauges().get("variable.running.application");
+    }
+    if (numRunningContainersGauge == null &&
+            metrics.getGauges().containsKey("variable.running.container")) {
+      numRunningContainersGauge =
+              metrics.getGauges().get("variable.running.container");
+    }
+    numRunningApps = numRunningAppsGauge == null ? "0" :
+            numRunningAppsGauge.getValue().toString();
+    numRunningContainers = numRunningContainersGauge == null ? "0" :
+            numRunningContainersGauge.getValue().toString();
+
+    // cluster available/allocate resource
+    double allocatedMemoryGB, allocatedVCoresGB,
+            availableMemoryGB, availableVCoresGB;
+    if (allocatedMemoryGauge == null &&
+            metrics.getGauges()
+                    .containsKey("variable.cluster.allocated.memory")) {
+      allocatedMemoryGauge = metrics.getGauges()
+              .get("variable.cluster.allocated.memory");
+    }
+    if (allocatedVCoresGauge == null &&
+            metrics.getGauges()
+                    .containsKey("variable.cluster.allocated.vcores")) {
+      allocatedVCoresGauge = metrics.getGauges()
+              .get("variable.cluster.allocated.vcores");
+    }
+    if (availableMemoryGauge == null &&
+            metrics.getGauges()
+                    .containsKey("variable.cluster.available.memory")) {
+      availableMemoryGauge = metrics.getGauges()
+              .get("variable.cluster.available.memory");
+    }
+    if (availableVCoresGauge == null &&
+            metrics.getGauges()
+                    .containsKey("variable.cluster.available.vcores")) {
+      availableVCoresGauge = metrics.getGauges()
+              .get("variable.cluster.available.vcores");
+    }
+    allocatedMemoryGB = allocatedMemoryGauge == null ? 0 :
+            Double.parseDouble(allocatedMemoryGauge.getValue().toString())/1024;
+    allocatedVCoresGB = allocatedVCoresGauge == null ? 0 :
+            Double.parseDouble(allocatedVCoresGauge.getValue().toString());
+    availableMemoryGB = availableMemoryGauge == null ? 0 :
+            Double.parseDouble(availableMemoryGauge.getValue().toString())/1024;
+    availableVCoresGB = availableVCoresGauge == null ? 0 :
+            Double.parseDouble(availableVCoresGauge.getValue().toString());
+
+    // scheduler operation
+    double allocateTimecost, handleTimecost;
+    if (allocateTimecostHistogram == null &&
+            metrics.getHistograms().containsKey(
+                    "sampler.scheduler.operation.allocate.timecost")) {
+      allocateTimecostHistogram = metrics.getHistograms()
+              .get("sampler.scheduler.operation.allocate.timecost");
+    }
+    if (handleTimecostHistogram == null &&
+            metrics.getHistograms().containsKey(
+                    "sampler.scheduler.operation.handle.timecost")) {
+      handleTimecostHistogram = metrics.getHistograms()
+              .get("sampler.scheduler.operation.handle.timecost");
+    }
+    allocateTimecost = allocateTimecostHistogram == null ? 0.0 :
+            allocateTimecostHistogram.getSnapshot().getMean()/1000000;
+    handleTimecost = handleTimecostHistogram == null ? 0.0 :
+            handleTimecostHistogram.getSnapshot().getMean()/1000000;
+    // various handle operation
+    Map<SchedulerEventType, Double> handleOperTimecostMap =
+            new HashMap<SchedulerEventType, Double>();
+    for (SchedulerEventType e : SchedulerEventType.values()) {
+      String key = "sampler.scheduler.operation.handle." + e + ".timecost";
+      if (! handleOperTimecostHistogramMap.containsKey(e) &&
+              metrics.getHistograms().containsKey(key)) {
+        handleOperTimecostHistogramMap.put(e, metrics.getHistograms().get(key));
+      }
+      double timecost = handleOperTimecostHistogramMap.containsKey(e) ?
+          handleOperTimecostHistogramMap.get(e).getSnapshot().getMean()/1000000
+              : 0;
+      handleOperTimecostMap.put(e, timecost);
+    }
+
+    // allocated resource for each queue
+    Map<String, Double> queueAllocatedMemoryMap = new HashMap<String, Double>();
+    Map<String, Long> queueAllocatedVCoresMap = new HashMap<String, Long>();
+    for (String queue : wrapper.getQueueSet()) {
+      // memory
+      String key = "counter.queue." + queue + ".allocated.memory";
+      if (! queueAllocatedMemoryCounterMap.containsKey(queue) &&
+              metrics.getCounters().containsKey(key)) {
+        queueAllocatedMemoryCounterMap.put(queue,
+                metrics.getCounters().get(key));
+      }
+      double queueAllocatedMemoryGB =
+              queueAllocatedMemoryCounterMap.containsKey(queue) ?
+                  queueAllocatedMemoryCounterMap.get(queue).getCount()/1024.0
+                      : 0;
+      queueAllocatedMemoryMap.put(queue, queueAllocatedMemoryGB);
+      // vCores
+      key = "counter.queue." + queue + ".allocated.cores";
+      if (! queueAllocatedVCoresCounterMap.containsKey(queue) &&
+              metrics.getCounters().containsKey(key)) {
+        queueAllocatedVCoresCounterMap.put(
+                queue, metrics.getCounters().get(key));
+      }
+      long queueAllocatedVCores =
+              queueAllocatedVCoresCounterMap.containsKey(queue) ?
+                      queueAllocatedVCoresCounterMap.get(queue).getCount(): 0;
+      queueAllocatedVCoresMap.put(queue, queueAllocatedVCores);
+    }
+
+    // package results
+    StringBuilder sb = new StringBuilder();
+    sb.append("{");
+    sb.append("\"time\":" ).append(System.currentTimeMillis())
+            .append(",\"jvm.free.memory\":").append(jvmFreeMemoryGB)
+            .append(",\"jvm.max.memory\":").append(jvmMaxMemoryGB)
+            .append(",\"jvm.total.memory\":").append(jvmTotalMemoryGB)
+            .append(",\"running.applications\":").append(numRunningApps)
+            .append(",\"running.containers\":").append(numRunningContainers)
+            .append(",\"cluster.allocated.memory\":").append(allocatedMemoryGB)
+            .append(",\"cluster.allocated.vcores\":").append(allocatedVCoresGB)
+            .append(",\"cluster.available.memory\":").append(availableMemoryGB)
+            .append(",\"cluster.available.vcores\":").append(availableVCoresGB);
+
+    for (String queue : wrapper.getQueueSet()) {
+      sb.append(",\"queue.").append(queue).append(".allocated.memory\":")
+              .append(queueAllocatedMemoryMap.get(queue));
+      sb.append(",\"queue.").append(queue).append(".allocated.vcores\":")
+              .append(queueAllocatedVCoresMap.get(queue));
+    }
+    // scheduler allocate & handle
+    sb.append(",\"scheduler.allocate.timecost\":").append(allocateTimecost);
+    sb.append(",\"scheduler.handle.timecost\":").append(handleTimecost);
+    for (SchedulerEventType e : SchedulerEventType.values()) {
+      sb.append(",\"scheduler.handle-").append(e).append(".timecost\":")
+              .append(handleOperTimecostMap.get(e));
+    }
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * package metrics information for one tracked queue/app
+   * only support FairScheduler currently
+   * @throws java.io.IOException
+   */
+  private void printJsonTrack(HttpServletRequest request,
+                              HttpServletResponse response) throws IOException {
+    response.setContentType("text/json");
+    response.setStatus(HttpServletResponse.SC_OK);
+
+    StringBuilder sb = new StringBuilder();
+    if(schedulerMetrics instanceof FairSchedulerMetrics) {
+      String para = request.getParameter("t");
+      if (para.startsWith("Job ")) {
+        String appId = para.substring("Job ".length());
+
+        sb.append("{");
+        sb.append("\"time\": ").append(System.currentTimeMillis()).append(",");
+        sb.append("\"appId\": \"").append(appId).append("\"");
+        for(String metric : this.schedulerMetrics.getAppTrackedMetrics()) {
+          String key = "variable.app." + appId + "." + metric;
+          sb.append(",\"").append(metric).append("\": ");
+          if (metrics.getGauges().containsKey(key)) {
+            double memoryGB =
+                    Double.parseDouble(
+                            metrics.getGauges().get(key).getValue().toString())
+                            / 1024;
+            sb.append(memoryGB);
+          } else {
+            sb.append(-1);
+          }
+        }
+        sb.append("}");
+
+      } else if(para.startsWith("Queue ")) {
+        String queueName = para.substring("Queue ".length());
+        sb.append("{");
+        sb.append("\"time\": ").append(System.currentTimeMillis()).append(",");
+        sb.append("\"queueName\": \"").append(queueName).append("\"");
+        for(String metric : this.schedulerMetrics.getQueueTrackedMetrics()) {
+          String key = "variable.queue." + queueName + "." + metric;
+          sb.append(",\"").append(metric).append("\": ");
+          if (metrics.getGauges().containsKey(key)) {
+            double memoryGB =
+                    Double.parseDouble(
+                            metrics.getGauges().get(key).getValue().toString())
+                            / 1024;
+            sb.append(memoryGB);
+          } else {
+            sb.append(-1);
+          }
+        }
+        sb.append("}");
+      }
+    }
+    String output = sb.toString();
+    if (output.isEmpty()) {
+      output = "[]";
+    }
+    response.getWriter().println(output);
+    // package result
+    ((Request) request).setHandled(true);
+  }
+}

+ 67 - 0
hadoop-tools/hadoop-sls/src/main/sample-conf/capacity-scheduler.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<!--
+  This file contains queue allocations for the Capacity Scheduler.
+  Its format is explained in the Capacity Scheduler documentation at
+  http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/CapacityScheduler.html.
+  The documentation also includes a sample config file.
+-->
+
+<configuration>
+  <property>
+    <name>yarn.scheduler.capacity.root.queues</name>
+    <value>sls_queue_1,sls_queue_2,sls_queue_3</value>
+    <description>The queues at the this level (root is the root queue).
+    </description>
+  </property>
+  
+  <property>
+    <name>yarn.scheduler.capacity.root.sls_queue_1.capacity</name>
+    <value>25</value>
+  </property>
+
+  <property>
+    <name>yarn.scheduler.capacity.root.sls_queue_1.maximum-capacity</name>
+    <value>100</value>
+  </property>
+  
+  <property>
+    <name>yarn.scheduler.capacity.root.sls_queue_2.capacity</name>
+    <value>25</value>
+  </property>
+
+  <property>
+    <name>yarn.scheduler.capacity.root.sls_queue_2.maximum-capacity</name>
+    <value>100</value>
+  </property>
+  
+  <property>
+    <name>yarn.scheduler.capacity.root.sls_queue_3.capacity</name>
+    <value>50</value>
+  </property>
+
+  <property>
+    <name>yarn.scheduler.capacity.root.sls_queue_3.maximum-capacity</name>
+    <value>100</value>
+  </property>
+  
+  <property>
+    <name>yarn.scheduler.capacity.maximum-applications</name>
+    <value>1000</value>
+    <description>Maximum number of applications in the system which 
+    can be concurrently active both running and pending</description>
+  </property>
+</configuration>

+ 50 - 0
hadoop-tools/hadoop-sls/src/main/sample-conf/fair-scheduler-allocation.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<!--
+  This file contains pool and user allocations for the Fair Scheduler.
+  Its format is explained in the Fair Scheduler documentation at
+  http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/FairScheduler.html
+  The documentation also includes a sample config file.
+-->
+
+<allocations>
+  <user name="jenkins">
+    <!-- Limit on running jobs for the user across all pools. If more
+      jobs than this are submitted, only the first <maxRunningJobs> will
+      be scheduled at any given time. Defaults to infinity or the
+      userMaxJobsDefault value set below. -->
+    <maxRunningJobs>1000</maxRunningJobs>
+  </user>
+  <userMaxAppsDefault>1000</userMaxAppsDefault>
+  <queue name="sls_queue_1">
+    <minResources>1024 mb, 1 vcores</minResources>
+    <schedulingMode>fair</schedulingMode>
+    <weight>0.25</weight>
+    <minSharePreemptionTimeout>2</minSharePreemptionTimeout>
+  </queue>
+  <queue name="sls_queue_2">
+    <minResources>1024 mb, 1 vcores</minResources>
+    <schedulingMode>fair</schedulingMode>
+    <weight>0.25</weight>
+    <minSharePreemptionTimeout>2</minSharePreemptionTimeout>
+  </queue>
+  <queue name="sls_queue_3">
+    <minResources>1024 mb, 1 vcores</minResources>
+    <weight>0.5</weight>
+    <schedulingMode>fair</schedulingMode>
+    <minSharePreemptionTimeout>2</minSharePreemptionTimeout>
+  </queue>
+</allocations>

+ 47 - 0
hadoop-tools/hadoop-sls/src/main/sample-conf/fair-scheduler.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<!--
+  This file contains pool and user allocations for the Fair Scheduler.
+  Its format is explained in the Fair Scheduler documentation at
+  http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/FairScheduler.html.
+  The documentation also includes a sample config file.
+-->
+
+<configuration>
+  <property>
+    <description>Absolute path to allocation file. An allocation file is an XML
+    manifest describing queues and their properties, in addition to certain
+    policy defaults. This file must be in XML format as described in
+    http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/FairScheduler.html.
+    </description>
+    <name>yarn.scheduler.fair.allocation.file</name>
+    <value>fair-scheduler-allocation.xml</value>
+  </property>
+
+  <property>
+    <description>Whether to use preemption. Note that preemption is experimental
+    in the current version. Defaults to false.</description>
+    <name>yarn.scheduler.fair.preemption</name>
+    <value>true</value>
+  </property>
+
+  <property>
+    <description>Whether to allow multiple container assignments in one
+    heartbeat. Defaults to false.</description>
+    <name>yarn.scheduler.fair.assignmultiple</name>
+    <value>true</value>
+  </property>
+</configuration>

+ 19 - 0
hadoop-tools/hadoop-sls/src/main/sample-conf/log4j.properties

@@ -0,0 +1,19 @@
+#
+# Licensed 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. See accompanying LICENSE file.
+#
+log4j.appender.test=org.apache.log4j.ConsoleAppender
+log4j.appender.test.Target=System.out
+log4j.appender.test.layout=org.apache.log4j.PatternLayout
+log4j.appender.test.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+log4j.logger=NONE, test

+ 81 - 0
hadoop-tools/hadoop-sls/src/main/sample-conf/sls-runner.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<configuration>
+
+  <!-- SLSRunner configuration -->
+  <property>
+    <name>yarn.sls.runner.pool.size</name>
+    <value>100</value>
+  </property>
+  
+  <!-- Nodes configuration -->
+  <property>
+    <name>yarn.sls.nm.memory.mb</name>
+    <value>10240</value>
+  </property>
+  <property>
+    <name>yarn.sls.nm.vcores</name>
+    <value>10</value>
+  </property>
+  <property>
+    <name>yarn.sls.nm.heartbeat.interval.ms</name>
+    <value>1000</value>
+  </property>
+  
+  <!-- Apps configuration -->
+  <property>
+    <name>yarn.sls.am.heartbeat.interval.ms</name>
+    <value>1000</value>
+  </property>
+  <property>
+    <name>yarn.sls.am.type.mapreduce</name>
+    <value>org.apache.hadoop.yarn.sls.appmaster.MRAMSimulator</value>
+  </property>
+
+  <!-- Containers configuration -->
+  <property>
+    <name>yarn.sls.container.memory.mb</name>
+    <value>1024</value>
+  </property>
+  <property>
+    <name>yarn.sls.container.vcores</name>
+    <value>1</value>
+  </property>
+
+  <!--  metrics  -->
+  <property>
+    <name>yarn.sls.metrics.switch</name>
+    <value>ON</value>
+  </property>
+  <property>
+    <name>yarn.sls.metrics.web.address.port</name>
+    <value>10001</value>
+  </property>
+  <property>
+    <name>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler</name>
+    <value>org.apache.hadoop.yarn.sls.scheduler.FifoSchedulerMetrics</value>
+  </property>
+  <property>
+    <name>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler</name>
+    <value>org.apache.hadoop.yarn.sls.scheduler.FairSchedulerMetrics</value>
+  </property>
+  <property>
+    <name>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</name>
+    <value>org.apache.hadoop.yarn.sls.scheduler.CapacitySchedulerMetrics</value>
+  </property>
+  
+</configuration>

+ 60 - 0
hadoop-tools/hadoop-sls/src/main/sample-conf/yarn-site.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<configuration>
+  <property>
+    <name>yarn.resourcemanager.scheduler.class</name>
+    <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler</value>
+    <!-- <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler</value> -->
+    <!-- <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</value> -->
+  </property>
+
+  <property>
+    <description>The address of the RM web application.</description>
+    <name>yarn.resourcemanager.webapp.address</name>
+    <value>localhost:18088</value>
+  </property>
+
+  <property>
+    <name>yarn.resourcemanager.resource-tracker.address</name>
+    <value>localhost:18031</value>
+  </property>
+
+  <property>
+    <description>The address of the scheduler interface.</description>
+    <name>yarn.resourcemanager.scheduler.address</name>
+    <value>localhost:18030</value>
+  </property>
+
+  <property>
+    <description>The address of the applications manager interface in the RM.</description>
+    <name>yarn.resourcemanager.address</name>
+    <value>localhost:18032</value>
+  </property>
+
+  <property>
+    <description>The address of the RM admin interface.</description>
+    <name>yarn.resourcemanager.admin.address</name>
+    <value>localhost:18033</value>
+  </property>
+
+  <property>
+    <description>Set to false, to avoid ip check</description>
+    <name>hadoop.security.token.service.use_ip</name>
+    <value>false</value>
+  </property>
+
+</configuration>

+ 440 - 0
hadoop-tools/hadoop-sls/src/site/apt/SchedulerLoadSimulator.apt.vm

@@ -0,0 +1,440 @@
+~~ Licensed 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.
+
+  ---
+  Yarn Scheduler Load Simulator (SLS)
+  ---
+  ---
+  ${maven.build.timestamp}
+
+Yarn Scheduler Load Simulator (SLS)
+
+  \[ {{{./index.html}Go Back}} \]
+
+%{toc|section=1|fromDepth=0}
+
+* Overview
+
+** Overview
+
+  The Yarn scheduler is a fertile area of interest with different
+  implementations, e.g., Fifo, Capacity and Fair schedulers. Meanwhile, several
+  optimizations are also made to improve scheduler performance for different
+  scenarios and workload. Each scheduler algorithm has its own set of features,
+  and drives scheduling decisions by many factors, such as fairness, capacity
+  guarantee, resource availability, etc. It is very important to evaluate a
+  scheduler algorithm very well before we deploy in a production cluster.
+  Unfortunately, currently it is non-trivial to evaluate a scheduler algorithm.
+  Evaluating in a real cluster is always time and cost consuming, and it is
+  also very hard to find a large-enough cluster. Hence, a simulator which can
+  predict how well a scheduler algorithm for some specific workload would be
+  quite useful.
+
+  The Yarn Scheduler Load Simulator (SLS) is such a tool, which can simulate
+  large-scale Yarn clusters and application loads in a single machine.This
+  simulator would be invaluable in furthering Yarn by providing a tool for
+  researchers and developers to prototype new scheduler features and predict
+  their behavior and performance with reasonable amount of confidence,
+  thereby aiding rapid innovation.
+
+  The simulator will exercise the real Yarn <<<ResourceManager>>> removing the
+  network factor by simulating <<<NodeManagers>>> and <<<ApplicationMasters>>>
+  via handling and dispatching <<<NM>>>/<<<AMs>>> heartbeat events from within
+  the same JVM. To keep tracking of scheduler behavior and performance, a
+  scheduler wrapper will wrap the real scheduler.
+
+  The size of the cluster and the application load can be loaded from
+  configuration files, which are generated from job history files directly by
+  adopting {{{https://hadoop.apache.org/docs/stable/rumen.html}Apache Rumen}}.
+
+  The simulator will produce real time metrics while executing, including:
+
+  * Resource usages for whole cluster and each queue, which can be utilized to
+    configure cluster and queue's capacity.
+
+  * The detailed application execution trace (recorded in relation to simulated
+    time), which can be analyzed to understand/validate the scheduler behavior
+    (individual jobs turn around time, throughput, fairness, capacity guarantee,
+    etc.).
+
+  * Several key metrics of scheduler algorithm, such as time cost of each
+    scheduler operation (allocate, handle, etc.), which can be utilized by Hadoop
+    developers to find the code spots and scalability limits.
+
+** Goals
+
+  * Exercise the scheduler at scale without a real cluster using real job
+    traces.
+
+  * Being able to simulate real workloads.
+
+** Architecture
+
+  The following figure illustrates the implementation architecture of the
+  simulator.
+
+[images/sls_arch.png] The architecture of the simulator
+
+  The simulator takes input of workload traces, and fetches the cluster and
+  applications information. For each NM and AM, the simulator builds a simulator
+  to simulate their running. All NM/AM simulators run in a thread pool. The
+  simulator reuses Yarn Resource Manager, and builds a wrapper out of the
+  scheduler. The Scheduler Wrapper can track the scheduler behaviors and
+  generates several logs, which are the outputs of the simulator and can be
+  further analyzed.
+
+** Usecases
+
+  * Engineering
+
+    * Verify correctness of scheduler algorithm under load
+
+    * Cheap/practical way for finding code hotspots/critical-path.
+
+    * Validate the impact of changes and new features.
+
+    * Determine what drives the scheduler scalability limits.
+
+      []
+
+  * QA
+
+    * Validate scheduler behavior for "large" clusters and several workload
+    profiles.
+
+  * Solutions/Sales.
+
+    * Sizing model for predefined/typical workloads.
+
+    * Cluster sizing tool using real customer data (job traces).
+
+    * Determine minimum SLAs under a particular workload.
+
+* Usage
+
+  This section will show how to use the simulator. Here let <<<$HADOOP_ROOT>>>
+  represent the Hadoop install directory. If you build Hadoop yourself,
+  <<<$HADOOP_ROOT>>> is <<<hadoop-dist/target/hadoop-$VERSION>>>. The simulator
+  is located at <<<$HADOOP_ROOT/share/hadoop/tools/sls>>>. The fold <<<sls>>>
+  containers four directories: <<<bin>>>, <<<html>>>, <<<sample-conf>>>, and
+  <<<sample-data>>>
+
+  * <<<bin>>>: contains running scripts for the simulator.
+
+  * <<<html>>>: contains several html/css/js files we needed for real-time
+  tracking.
+
+  * <<<sample-conf>>>: specifies the simulator configurations.
+
+  * <<<sample-data>>>: provides an example rumen trace, which can be used to
+  generate inputs of the simulator.
+
+    []
+
+  The following sections will describe how to use the simulator step by step.
+  Before start, make sure that command <<<hadoop>>> is included in your
+  <<<$PATH>>> environment parameter.
+
+** Step 1: Configure Hadoop and the simulator
+
+  Before we start, make sure Hadoop and the simulator are configured well.
+  All configuration files for Hadoop and the simulator should be placed in
+  directory <<<$HADOOP_ROOT/etc/hadoop>>>, where the <<<ResourceManager>>>
+  and Yarn scheduler load their configurations. Directory
+  <<<$HADOOP_ROOT/share/hadoop/tools/sls/sample-conf/>>> provides several
+  example configurations, that can be used to start a demo.
+
+  For configuration of Hadoop and Yarn scheduler, users can refer to Yarn’s
+  website ({{{http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/}
+  http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/}}).
+
+  For the simulator, it loads configuration information from file
+  <<<$HADOOP_ROOT/etc/hadoop/sls-runner.xml>>>.
+
+  Here we illustrate each configuration parameter in <<<sls-runner.xml>>>.
+  Note that <<<$HADOOP_ROOT/share/hadoop/tools/sls/sample-conf/sls-runner.xml>>>
+  contains all the default values for these configuration parameters.
+
+  * <<<yarn.sls.runner.pool.size>>>
+
+  The simulator uses a thread pool to simulate the <<<NM>>> and <<<AM>>> running
+  , and this parameter specifies the number of threads in the pool.
+
+  * <<<yarn.sls.nm.memory.mb>>>
+
+  The total memory for each <<<NMSimulator>>>.
+
+  * <<<yarn.sls.nm.vcores>>>
+
+  The total vCores for each <<<NMSimulator>>>.
+
+  * <<<yarn.sls.nm.heartbeat.interval.ms>>>
+
+  The heartbeat interval for each <<<NMSimulator>>>.
+
+  * <<<yarn.sls.am.heartbeat.interval.ms>>>
+
+  The heartbeat interval for each <<<AMSimulator>>>.
+
+  * <<<yarn.sls.am.type.mapreduce>>>
+
+  The <<<AMSimulator>>> implementation for MapReduce-like applications.
+  Users can specify implementations for other type of applications.
+
+  * <<<yarn.sls.container.memory.mb>>>
+
+  The memory required for each container simulator.
+
+  * <<<yarn.sls.container.vcores>>>
+
+  The vCores required for each container simulator.
+
+  * <<<yarn.sls.runner.metrics.switch>>>
+
+  The simulator introduces {{{http://metrics.codahale.com/}Metrics}} to measure
+  the behaviors of critical components and operations. This field specifies
+  whether we open (<<<ON>>>) or close (<<<OFF>>>) the Metrics running.
+
+  * <<<yarn.sls.metrics.web.address.port>>>
+
+  The port used by simulator to provide real-time tracking. The default value is
+  10001.
+
+  * <<<org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler>>>
+
+  The implementation of scheduler metrics of Fifo Scheduler.
+
+  * <<<org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler>>>
+
+  The implementation of scheduler metrics of Fair Scheduler.
+
+  * <<<org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler>>>
+
+  The implementation of scheduler metrics of Capacity Scheduler.
+
+** Step 2: Run the simulator
+
+  The simulator supports two types of input files: the rumen traces and its own
+  input traces. The script to start the simulator is <<<slsrun.sh>>>.
+
++----+
+$ $HADOOP_ROOT/share/hadoop/tools/sls/bin/slsrun.sh
+    --input-rumen|--input-sls=<TRACE_FILE1,TRACE_FILE2,...>
+    --output-dir=<SLS_SIMULATION_OUTPUT_DIRECTORY> [--nodes=<SLS_NODES_FILE>]
+    [--track-jobs=<JOBID1,JOBID2,...>] [--print-simulation]
++----+
+
+  * <<<--input-rumen>>>: The input rumen trace files. Users can input multiple
+  files, separated by comma. One example trace is provided in
+  <<<$HADOOP_ROOT/share/hadoop/tools/sls/sample-data/2jobs2min-rumen-jh.json>>>.
+
+  * <<<--input-sls>>>: Simulator its own file format. The simulator also
+  provides a tool to convert rumen traces to sls traces (<<<rumen2sls.sh>>>).
+  Refer to appendix for an example of sls input json file.
+
+  * <<<--output-dir>>>: The output directory for generated running logs and
+  metrics.
+
+  * <<<--nodes>>>: The cluster topology. By default, the simulator will use the
+  topology fetched from the input json files. Users can specifies a new topology
+  by setting this parameter. Refer to the appendix for the topology file format.
+
+  * <<<--track-jobs>>>: The particular jobs that will be tracked during
+  simulator running, spearated by comma.
+
+  * <<<--print-simulation>>>: Whether to print out simulation information
+  before simulator running, including number of nodes, applications, tasks,
+  and information for each application.
+
+  In comparison to rumen format, here the sls format is much simpler and users
+  can easily generate various workload. The simulator also provides a tool to
+  convert rumen traces to sls traces.
+
++----+
+$ $HADOOP_ROOT/share/hadoop/tools/sls/bin/rumen2sls.sh
+    --rumen-file=<RUMEN_FILE>
+    --output-dir=<SLS_OUTPUT_DIRECTORY>
+    [--output-prefix=<SLS_FILE_PREFIX>]
++----+
+
+  * <<<--rumen-file>>>: The rumen format file. One example trace is provided
+  in directory <<<sample-data>>>.
+
+  * <<<--output-dir>>>: The output directory of generated simulation traces.
+  Two files will be generated in this output directory, including one trace
+  file including all job and task information, and another file showing the
+  topology information.
+
+  * <<<--output-prefix>>>: The prefix of the generated files. The default value
+  is ”sls”, and the two generated files are <<<sls-jobs.json>>> and
+  <<<sls-nodes.json>>>.
+
+* Metrics
+
+  The Yarn Scheduler Load Simulator has integrated
+  {{{http://metrics.codahale.com/}Metrics}} to measure the behaviors of critical
+  components and operations, including running applications and containers,
+  cluster available resources, scheduler operation timecost, et al. If the
+  switch <<<yarn.sls.runner.metrics.switch>>> is set <<<ON>>>, <<<Metrics>>>
+  will run and output it logs in <<<--output-dir>>> directory specified by users.
+  Users can track these information during simulator running, and can also
+  analyze these logs after running to evaluate the scheduler performance.
+
+** Real-time Tracking
+
+  The simulator provides an interface for tracking its running in real-time.
+  Users can go to <<<http://host:port/simulate>>> to track whole running,
+  and <<<http://host:port/track>>> to track a particular job or queue. Here
+  the <<<host>>> is the place when we run the simulator, and <<<port>>> is
+  the value configured by <<<yarn.sls.metrics.web.address.port>>> (default value
+  is 10001).
+
+  Here we'll illustrate each chart shown in the webpage.
+
+  The first figure describes the number of running applications and containers.
+
+[images/sls_running_apps_containers.png] Number of running applications/containers
+
+  The second figure describes the allocated and available resources (memory)
+  in the cluster.
+
+[images/sls_cluster_memory.png] Cluster Resource (Memory)
+
+  The third figure describes the allocated resource for each queue. Here we have
+  three queues: sls_queue_1, sls_queue_2, and sls_queue_3.The first two queues
+  are configured with 25% share, while the last one has 50% share.
+
+[images/sls_queue_allocated_memory.png] Queue Allocated Resource (Memory)
+
+  The fourth figure describes the timecost for each scheduler operation.
+
+[images/sls_scheduler_operation_timecost.png] Scheduler Opertion Timecost
+
+  Finally, we measure the memory used by the simulator.
+
+[images/sls_JVM.png] JVM Memory
+
+  The simulator also provides an interface for tracking some particular
+  jobs and queues. Go to <<<http://<Host>:<Port>/track>>> to get these
+  information.
+
+  Here the first figure illustrates the resource usage information for queue
+  <<<SLS_Queue_1>>>.
+
+[images/sls_track_queue.png] Tracking Queue <<<sls_queue_3>>>
+
+  The second figure illustrates the resource usage information for job
+  <<<job_1369942127770_0653>>>.
+
+[images/sls_track_job.png] Tracking Job <<<job_1369942127770_0653>>>
+
+** Offline Analysis
+
+  After the simulator finishes, all logs are saved in the output directory
+  specified by <<<--output-dir>>> in
+  <<<$HADOOP_ROOT/share/hadoop/tools/sls/bin/slsrun.sh>>>.
+
+  * File <<<realtimetrack.json>>>: records all real-time tracking logs every 1
+  second.
+
+  * File <<<jobruntime.csv>>>: records all jobs’ start and end time in the
+  simulator.
+
+  * Folder <<<metrics>>>: logs generated by the Metrics.
+
+    []
+
+  Users can also reproduce those real-time tracking charts in offline mode.
+  Just upload the <<<realtimetrack.json>>> to
+  <<<$HADOOP_ROOT/share/hadoop/tools/sls/html/showSimulationTrace.html>>>.
+  For browser security problem, need to put files <<<realtimetrack.json>>> and
+  <<<showSimulationTrace.html>>> in the same directory.
+
+* Appendix
+
+** Resources
+
+  {{{https://issues.apache.org/jira/browse/YARN-1021}YARN-1021}} is the main
+  JIRA that introduces Yarn Scheduler Load Simulator to Hadoop Yarn project.
+
+** SLS JSON input file format
+
+  Here we provide an example format of the sls json file, which contains 2 jobs.
+  The first job has 3 map tasks and the second one has 2 map tasks.
+
++----+
+{
+  "am.type" : "mapreduce",
+  "job.start.ms" : 0,
+  "job.end.ms" : 95375,
+  "job.queue.name" : "sls_queue_1",
+  "job.id" : "job_1",
+  "job.user" : "default",
+  "job.tasks" : [ {
+    "container.host" : "/default-rack/node1",
+    "container.start.ms" : 6664,
+    "container.end.ms" : 23707,
+    "container.priority" : 20,
+    "container.type" : "map"
+  }, {
+    "container.host" : "/default-rack/node3",
+    "container.start.ms" : 6665,
+    "container.end.ms" : 21593,
+    "container.priority" : 20,
+    "container.type" : "map"
+  }, {
+    "container.host" : "/default-rack/node2",
+    "container.start.ms" : 68770,
+    "container.end.ms" : 86613,
+    "container.priority" : 20,
+    "container.type" : "map"
+  } ]
+}
+{
+  "am.type" : "mapreduce",
+  "job.start.ms" : 105204,
+  "job.end.ms" : 197256,
+  "job.queue.name" : "sls_queue_2",
+  "job.id" : "job_2",
+  "job.user" : "default",
+  "job.tasks" : [ {
+    "container.host" : "/default-rack/node1",
+    "container.start.ms" : 111822,
+    "container.end.ms" : 133985,
+    "container.priority" : 20,
+    "container.type" : "map"
+  }, {
+    "container.host" : "/default-rack/node2",
+    "container.start.ms" : 111788,
+    "container.end.ms" : 131377,
+    "container.priority" : 20,
+    "container.type" : "map"
+  } ]
+}
++----+
+
+** Simulator input topology file format
+
+  Here is an example input topology file which has 3 nodes organized in 1 rack.
+
++----+
+{
+  "rack" : "default-rack",
+  "nodes" : [ {
+    "node" : "node1"
+  }, {
+    "node" : "node2"
+  }, {
+    "node" : "node3"
+  }]
+}
++----+

+ 30 - 0
hadoop-tools/hadoop-sls/src/site/resources/css/site.css

@@ -0,0 +1,30 @@
+/*
+* 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.
+*/
+#banner {
+  height: 93px;
+  background: none;
+}
+
+#bannerLeft img {
+  margin-left: 30px;
+  margin-top: 10px;
+}
+
+#bannerRight img {
+  margin: 17px;
+}
+

二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_JVM.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_arch.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_cluster_memory.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_cluster_vcores.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_queue_allocated_memory.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_queue_allocated_vcores.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_running_apps_containers.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_scheduler_operation_timecost.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_track_job.png


二進制
hadoop-tools/hadoop-sls/src/site/resources/images/sls_track_queue.png


+ 46 - 0
hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/TestSLSRunner.java

@@ -0,0 +1,46 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls;
+
+import org.apache.commons.io.FileUtils;
+import org.junit.Test;
+
+import java.io.File;
+import java.util.UUID;
+
+public class TestSLSRunner {
+
+  @Test
+  @SuppressWarnings("all")
+  public void testSimulatorRunning() throws Exception {
+    File tempDir = new File("target", UUID.randomUUID().toString());
+
+    // start the simulator
+    File slsOutputDir = new File(tempDir.getAbsolutePath() + "/slsoutput/");
+    String args[] = new String[]{
+            "-inputrumen", "src/main/data/2jobs2min-rumen-jh.json",
+            "-output", slsOutputDir.getAbsolutePath()};
+    SLSRunner.main(args);
+
+    // wait for 45 seconds before stop
+    Thread.sleep(45 * 1000);
+    SLSRunner.getRunner().stop();
+  }
+
+}

+ 247 - 0
hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/scheduler/TestTaskRunner.java

@@ -0,0 +1,247 @@
+/**
+ * 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.
+ */
+package org.apache.hadoop.yarn.sls.scheduler;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+public class TestTaskRunner {
+  private TaskRunner runner;
+
+  @Before
+  public void setUp() {
+    runner = new TaskRunner();
+    runner.setQueueSize(5);
+  }
+
+  @After
+  public void cleanUp() {
+    runner.stop();
+  }
+
+  public static class SingleTask extends TaskRunner.Task {
+    public static CountDownLatch latch = new CountDownLatch(1);
+    public static boolean first;
+
+    public SingleTask(long startTime) {
+      super.init(startTime);
+    }
+
+    @Override
+    public void firstStep() {
+      if (first) {
+        Assert.fail();
+      }
+      first = true;
+      latch.countDown();
+    }
+
+    @Override
+    public void middleStep() {
+      Assert.fail();
+    }
+
+    @Override
+    public void lastStep() {
+      Assert.fail();
+    }
+  }
+
+  @Test
+  public void testSingleTask() throws Exception {
+    runner.start();
+    runner.schedule(new SingleTask(0));
+    SingleTask.latch.await(5000, TimeUnit.MILLISECONDS);
+    Assert.assertTrue(SingleTask.first);
+  }
+
+  public static class DualTask extends TaskRunner.Task {
+    public static CountDownLatch latch = new CountDownLatch(1);
+    public static boolean first;
+    public static boolean last;
+
+    public DualTask(long startTime, long endTime, long interval) {
+      super.init(startTime, endTime, interval);
+    }
+
+    @Override
+    public void firstStep() {
+      if (first) {
+        Assert.fail();
+      }
+      first = true;
+    }
+
+    @Override
+    public void middleStep() {
+      Assert.fail();
+    }
+
+    @Override
+    public void lastStep() {
+      if (last) {
+        Assert.fail();
+      }
+      last = true;
+      latch.countDown();
+    }
+  }
+
+  @Test
+  public void testDualTask() throws Exception {
+    runner.start();
+    runner.schedule(new DualTask(0, 10, 10));
+    DualTask.latch.await(5000, TimeUnit.MILLISECONDS);
+    Assert.assertTrue(DualTask.first);
+    Assert.assertTrue(DualTask.last);
+  }
+
+  public static class TriTask extends TaskRunner.Task {
+    public static CountDownLatch latch = new CountDownLatch(1);
+    public static boolean first;
+    public static boolean middle;
+    public static boolean last;
+
+    public TriTask(long startTime, long endTime, long interval) {
+      super.init(startTime, endTime, interval);
+    }
+
+    @Override
+    public void firstStep() {
+      if (first) {
+        Assert.fail();
+      }
+      first = true;
+    }
+
+    @Override
+    public void middleStep() {
+      if (middle) {
+        Assert.fail();
+      }
+      middle = true;
+    }
+
+    @Override
+    public void lastStep() {
+      if (last) {
+        Assert.fail();
+      }
+      last = true;
+      latch.countDown();
+    }
+  }
+
+  @Test
+  public void testTriTask() throws Exception {
+    runner.start();
+    runner.schedule(new TriTask(0, 10, 5));
+    TriTask.latch.await(5000, TimeUnit.MILLISECONDS);
+    Assert.assertTrue(TriTask.first);
+    Assert.assertTrue(TriTask.middle);
+    Assert.assertTrue(TriTask.last);
+  }
+
+  public static class MultiTask extends TaskRunner.Task {
+    public static CountDownLatch latch = new CountDownLatch(1);
+    public static boolean first;
+    public static int middle;
+    public static boolean last;
+
+    public MultiTask(long startTime, long endTime, long interval) {
+      super.init(startTime, endTime, interval);
+    }
+
+    @Override
+    public void firstStep() {
+      if (first) {
+        Assert.fail();
+      }
+      first = true;
+    }
+
+    @Override
+    public void middleStep() {
+      middle++;
+    }
+
+    @Override
+    public void lastStep() {
+      if (last) {
+        Assert.fail();
+      }
+      last = true;
+      latch.countDown();
+    }
+  }
+
+  @Test
+  public void testMultiTask() throws Exception {
+    runner.start();
+    runner.schedule(new MultiTask(0, 20, 5));
+    MultiTask.latch.await(5000, TimeUnit.MILLISECONDS);
+    Assert.assertTrue(MultiTask.first);
+    Assert.assertEquals((20 - 0) / 5 - 2 + 1, MultiTask.middle);
+    Assert.assertTrue(MultiTask.last);
+  }
+
+
+  public static class PreStartTask extends TaskRunner.Task {
+    public static CountDownLatch latch = new CountDownLatch(1);
+    public static boolean first;
+
+    public PreStartTask(long startTime) {
+      super.init(startTime);
+    }
+
+    @Override
+    public void firstStep() {
+      if (first) {
+        Assert.fail();
+      }
+      first = true;
+      latch.countDown();
+    }
+
+    @Override
+    public void middleStep() {
+    }
+
+    @Override
+    public void lastStep() {
+    }
+  }
+
+  @Test
+  public void testPreStartQueueing() throws Exception {
+    runner.schedule(new PreStartTask(210));
+    Thread.sleep(210);
+    runner.start();
+    long startedAt = System.currentTimeMillis();
+    PreStartTask.latch.await(5000, TimeUnit.MILLISECONDS);
+    long runAt = System.currentTimeMillis();
+    Assert.assertTrue(PreStartTask.first);
+    Assert.assertTrue(runAt - startedAt >= 200);
+  }
+
+}

+ 34 - 0
hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/utils/TestSLSUtils.java

@@ -0,0 +1,34 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.utils;
+
+import junit.framework.Assert;
+import org.junit.Test;
+
+public class TestSLSUtils {
+
+  @Test
+  public void testGetRackHostname() {
+    String str = "/rack1/node1";
+    String rackHostname[] = SLSUtils.getRackHostName(str);
+    Assert.assertEquals(rackHostname[0], "rack1");
+    Assert.assertEquals(rackHostname[1], "node1");
+  }
+
+}

+ 121 - 0
hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/web/TestSLSWebApp.java

@@ -0,0 +1,121 @@
+/**
+ * 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.
+ */
+
+package org.apache.hadoop.yarn.sls.web;
+
+import junit.framework.Assert;
+import org.apache.commons.io.FileUtils;
+import org.apache.hadoop.yarn.sls.SLSRunner;
+import org.junit.Test;
+
+import java.io.File;
+import java.text.MessageFormat;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+public class TestSLSWebApp {
+
+  @Test
+  public void testSimulateInfoPageHtmlTemplate() throws Exception {
+    String simulateInfoTemplate = FileUtils.readFileToString(
+            new File("src/main/html/simulate.info.html.template"));
+
+    SLSRunner.simulateInfoMap.put("Number of racks", 10);
+    SLSRunner.simulateInfoMap.put("Number of nodes", 100);
+    SLSRunner.simulateInfoMap.put("Node memory (MB)", 1024);
+    SLSRunner.simulateInfoMap.put("Node VCores", 1);
+    SLSRunner.simulateInfoMap.put("Number of applications", 100);
+    SLSRunner.simulateInfoMap.put("Number of tasks", 1000);
+    SLSRunner.simulateInfoMap.put("Average tasks per applicaion", 10);
+    SLSRunner.simulateInfoMap.put("Number of queues", 4);
+    SLSRunner.simulateInfoMap.put("Average applications per queue", 25);
+    SLSRunner.simulateInfoMap.put("Estimated simulate time (s)", 10000);
+
+    StringBuilder info = new StringBuilder();
+    for (Map.Entry<String, Object> entry :
+            SLSRunner.simulateInfoMap.entrySet()) {
+      info.append("<tr>");
+      info.append("<td class='td1'>" + entry.getKey() + "</td>");
+      info.append("<td class='td2'>" + entry.getValue() + "</td>");
+      info.append("</tr>");
+    }
+
+    String simulateInfo =
+            MessageFormat.format(simulateInfoTemplate, info.toString());
+    Assert.assertTrue("The simulate info html page should not be empty",
+            simulateInfo.length() > 0);
+    for (Map.Entry<String, Object> entry :
+            SLSRunner.simulateInfoMap.entrySet()) {
+      Assert.assertTrue("The simulate info html page should have information "
+              + "of " + entry.getKey(), simulateInfo.contains("<td class='td1'>"
+              + entry.getKey() + "</td><td class='td2'>"
+              + entry.getValue() + "</td>"));
+    }
+  }
+
+  @Test
+  public void testSimulatePageHtmlTemplate() throws Exception {
+    String simulateTemplate = FileUtils.readFileToString(
+            new File("src/main/html/simulate.html.template"));
+
+    Set<String> queues = new HashSet<String>();
+    queues.add("sls_queue_1");
+    queues.add("sls_queue_2");
+    queues.add("sls_queue_3");
+    String queueInfo = "";
+    int i = 0;
+    for (String queue : queues) {
+      queueInfo += "legends[4][" + i + "] = 'queue" + queue
+              + ".allocated.memory'";
+      queueInfo += "legends[5][" + i + "] = 'queue" + queue
+              + ".allocated.vcores'";
+      i ++;
+    }
+    String simulateInfo = MessageFormat.format(simulateTemplate,
+            queueInfo, "s", 1000, 1000);
+    Assert.assertTrue("The simulate page html page should not be empty",
+            simulateInfo.length() > 0);
+  }
+
+  @Test
+  public void testTrackPageHtmlTemplate() throws Exception {
+    String trackTemplate = FileUtils.readFileToString(
+            new File("src/main/html/track.html.template"));
+    String trackedQueueInfo = "";
+    Set<String> trackedQueues = new HashSet<String>();
+    trackedQueues.add("sls_queue_1");
+    trackedQueues.add("sls_queue_2");
+    trackedQueues.add("sls_queue_3");
+    for(String queue : trackedQueues) {
+      trackedQueueInfo += "<option value='Queue " + queue + "'>"
+              + queue + "</option>";
+    }
+    String trackedAppInfo = "";
+    Set<String> trackedApps = new HashSet<String>();
+    trackedApps.add("app_1");
+    trackedApps.add("app_2");
+    for(String job : trackedApps) {
+      trackedAppInfo += "<option value='Job " + job + "'>" + job + "</option>";
+    }
+    String trackInfo = MessageFormat.format(trackTemplate, trackedQueueInfo,
+            trackedAppInfo, "s", 1000, 1000);
+    Assert.assertTrue("The queue/app tracking html page should not be empty",
+            trackInfo.length() > 0);
+  }
+}

+ 50 - 0
hadoop-tools/hadoop-sls/src/test/resources/fair-scheduler-allocation.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<!--
+  This file contains pool and user allocations for the Fair Scheduler.
+  Its format is explained in the Fair Scheduler documentation at
+  http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/FairScheduler.html
+  The documentation also includes a sample config file.
+-->
+
+<allocations>
+  <user name="jenkins">
+    <!-- Limit on running jobs for the user across all pools. If more
+      jobs than this are submitted, only the first <maxRunningJobs> will
+      be scheduled at any given time. Defaults to infinity or the
+      userMaxJobsDefault value set below. -->
+    <maxRunningJobs>1000</maxRunningJobs>
+  </user>
+  <userMaxAppsDefault>1000</userMaxAppsDefault>
+  <queue name="sls_queue_1">
+    <minResources>1024 mb, 1 vcores</minResources>
+    <schedulingMode>fair</schedulingMode>
+    <weight>0.25</weight>
+    <minSharePreemptionTimeout>2</minSharePreemptionTimeout>
+  </queue>
+  <queue name="sls_queue_2">
+    <minResources>1024 mb, 1 vcores</minResources>
+    <schedulingMode>fair</schedulingMode>
+    <weight>0.25</weight>
+    <minSharePreemptionTimeout>2</minSharePreemptionTimeout>
+  </queue>
+  <queue name="sls_queue_3">
+    <minResources>1024 mb, 1 vcores</minResources>
+    <weight>0.5</weight>
+    <schedulingMode>fair</schedulingMode>
+    <minSharePreemptionTimeout>2</minSharePreemptionTimeout>
+  </queue>
+</allocations>

+ 47 - 0
hadoop-tools/hadoop-sls/src/test/resources/fair-scheduler.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<!--
+  This file contains pool and user allocations for the Fair Scheduler.
+  Its format is explained in the Fair Scheduler documentation at
+  http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/FairScheduler.html.
+  The documentation also includes a sample config file.
+-->
+
+<configuration>
+  <property>
+    <description>Absolute path to allocation file. An allocation file is an XML
+    manifest describing queues and their properties, in addition to certain
+    policy defaults. This file must be in XML format as described in
+    http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/FairScheduler.html.
+    </description>
+    <name>yarn.scheduler.fair.allocation.file</name>
+    <value>src/test/resources/fair-scheduler-allocation.xml</value>
+  </property>
+
+  <property>
+    <description>Whether to use preemption. Note that preemption is experimental
+    in the current version. Defaults to false.</description>
+    <name>yarn.scheduler.fair.preemption</name>
+    <value>true</value>
+  </property>
+
+  <property>
+    <description>Whether to allow multiple container assignments in one
+    heartbeat. Defaults to false.</description>
+    <name>yarn.scheduler.fair.assignmultiple</name>
+    <value>true</value>
+  </property>
+</configuration>

+ 278 - 0
hadoop-tools/hadoop-sls/src/test/resources/simulate.html.template

@@ -0,0 +1,278 @@
+<html>
+  <head>
+    <meta charset="utf-8">
+      <link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
+      <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
+      <style type="text/css">
+        body '{' font: 20px sans-serif; '}'
+        .axis path,
+        .axis line '{' fill: none; stroke: #000; shape-rendering: crispEdges; '}'
+        .axis text '{' font-family: sans-serif; font-size: 20px; '}'
+        .line '{' fill: none; stroke: steelblue; stroke-width: 3px; '}'
+        .legend '{'
+          padding: 5px;
+          font: 18px sans-serif;
+          background: yellow;
+          box-shadow: 2px 2px 1px #888;
+        '}'
+        .title '{' font: 24px sans-serif; '}'
+        .divborder '{'
+          border-width: 1px;
+          border-style: solid;
+          border-color: black;
+          margin-top:10px
+        '}'
+      </style>
+      <script src="js/thirdparty/d3.v3.js"></script>
+      <script src="js/thirdparty/jquery.js"></script>
+      <script src="js/thirdparty/bootstrap.min.js"></script>
+    </head>
+  <body>
+    <div class="row">
+      <div class="span10 offset2"><br>
+        <input type="button" style="float: right;" value="Stop"
+               onClick="stop()" />
+      </div>
+    </div>
+    <div class="row">
+      <div class="divborder span8" style="margin-left:50px" id="area1"></div>
+      <div class="divborder span8" id="area2"></div>
+    </div>
+    <div class="row">
+      <div class="divborder span8" style="margin-left:50px" id="area3"></div>
+      <div class="divborder span8" id="area4"></div>
+    </div>
+    <div class="row">
+      <div class="divborder span8" style="margin-left:50px" id="area5"></div>
+      <div class="divborder span8" id="area6"></div>
+    </div>
+    <div class="row">
+      <div class="divborder span8" style="margin-left:50px" id="area7"></div>
+      <div class="span8" id="area8"></div>
+    </div><br/><br/>
+
+    <script>
+      var basetime = 0;
+      var running = 1;
+      var data = [];
+      var width, height;
+      var legends = [];
+      var titles = [];
+      var yLabels = [];
+      var isAreas = [];
+      var svgs = [];
+      var xs = [];
+      var ys = [];
+      var xAxiss = [];
+      var yAxiss = [];
+      var lineAreas = [];
+      var stacks = [];
+
+      // legends
+      legends[0] = [''running.applications'', ''running.containers''];
+      legends[1] = [''jvm.free.memory'', ''jvm.max.memory'', ''jvm.total.memory''];
+      legends[2] = [''cluster.allocated.memory'', ''cluster.available.memory''];
+      legends[3] = [''cluster.allocated.vcores'', ''cluster.available.vcores''];
+      legends[4] = [];
+      legends[5] = [];
+      {0}
+      legends[6] = [''scheduler.allocate.timecost'',
+                    ''scheduler.handle-NODE_ADDED.timecost'',
+                    ''scheduler.handle-NODE_REMOVED.timecost'',
+                    ''scheduler.handle-NODE_UPDATE.timecost'',
+                    ''scheduler.handle-APP_ADDED.timecost'',
+                    ''scheduler.handle-APP_REMOVED.timecost'',
+                    ''scheduler.handle-CONTAINER_EXPIRED.timecost''];
+
+      // title
+      titles[0] = ''Cluster running applications & containers'';
+      titles[1] = ''JVM memory'';
+      titles[2] = ''Cluster allocated & available memory'';
+      titles[3] = ''Cluster allocated & available vcores'';
+      titles[4] = ''Queue allocated memory'';
+      titles[5] = ''Queue allocated vcores'';
+      titles[6] = ''Scheduler allocate & handle operation timecost'';
+
+      // ylabels
+      yLabels[0] = ''Number'';
+      yLabels[1] = ''Memory (GB)'';
+      yLabels[2] = ''Memory (GB)'';
+      yLabels[3] = ''Number'';
+      yLabels[4] = ''Memory (GB)'';
+      yLabels[5] = ''Number'';
+      yLabels[6] = ''Timecost (ms)'';
+
+      // is area?
+      isAreas = [0, 0, 0, 0, 1, 1, 0];
+
+      // draw all charts
+      for (var i = 0; i < 7; i ++) '{'
+        drawEachChart(i);
+      '}'
+
+      // draw each chart
+      function drawEachChart(index) '{'
+        var margin = '{'top: 50, right: 250, bottom: 50, left: 70'}';
+        width = 750 - margin.left - margin.right;
+        height = 420 - margin.top - margin.bottom;
+
+      xs[index] = d3.scale.linear().range([0, width]);
+      ys[index] = d3.scale.linear().range([height, 0]);
+      xAxiss[index] = d3.svg.axis().scale(xs[index]).orient(''bottom'');
+      yAxiss[index] = d3.svg.axis().scale(ys[index]).orient(''left'');
+
+      if (isAreas[index] == 1)'{'
+        lineAreas[index] = d3.svg.area()
+                            .x(function(d) '{' return xs[index](d.time); '}')
+                            .y0(function(d) '{' return ys[index](d.y0); '}')
+                            .y1(function(d) '{' return ys[index](d.y0 + d.y); '}');
+
+        stacks[index] = d3.layout.stack()
+                          .values(function(d) '{' return d.values; '}');
+      '}' else '{'
+        lineAreas[index] = d3.svg.line()
+                            .interpolate(''basis'')
+                            .x(function(d) '{' return xs[index](d.time); '}')
+                            .y(function(d) '{' return ys[index](d.value); '}');
+      '}'
+
+      svgs[index] = d3.select(''#area'' + (index + 1)).append(''svg'')
+        .attr(''width'', width + margin.left + margin.right)
+        .attr(''height'', height + margin.top + margin.bottom)
+        .append(''g'')
+        .attr(''transform'', ''translate('' + margin.left + '','' + margin.top + '')'');
+
+      // x, y and title
+      svgs[index].append(''text'')
+        .attr(''transform'', ''translate('' + (width / 2) + '' ,'' +
+              (height + margin.bottom - 10 ) + '')'')
+        .style(''text-anchor'', ''middle'')
+        .text(''Time ({1})'');
+
+      svgs[index].append(''text'')
+        .attr(''transform'', ''rotate(-90)'')
+        .attr(''y'', 0 - margin.left)
+        .attr(''x'',0 - (height / 2))
+        .attr(''dy'', ''1em'')
+        .style(''text-anchor'', ''middle'')
+        .text(yLabels[index]);
+
+      svgs[index].append(''text'')
+        .attr(''x'', (width / 2))
+        .attr(''y'', 10 - (margin.top / 2))
+        .attr(''text-anchor'', ''middle'')
+        .text(titles[index]);
+    '}'
+
+    // request data
+    function requestData() '{'
+      $.ajax('{'url: ''simulateMetrics'',
+        success: function(point) '{'
+          // update data
+          if (basetime == 0)  basetime = point.time;
+          point.time = (point.time - basetime) / {2};
+          data.push(point);
+
+          // clear old
+          for (var i = 0; i < 7; i ++) '{'
+            svgs[i].selectAll(''g.tick'').remove();
+            svgs[i].selectAll(''g'').remove();
+            var color = d3.scale.category10();
+            color.domain(d3.keys(data[0]).filter(function(key) '{'
+              return $.inArray(key, legends[i]) !== -1;
+            '}'));
+
+            var values;
+            if (isAreas[i] == 1) '{'
+              values = stacks[i](color.domain().map(function(name) '{'
+                return '{'
+                  name: name,
+                  values: data.map(function(d) '{'
+                    return '{'time: d.time, y: d[name]'}';
+                  '}')
+                '}'
+              '}'));
+              xs[i].domain(d3.extent(data, function(d) '{' return d.time;'}'));
+              ys[i].domain([
+                d3.min(values, function(c) '{' return 0; '}'),
+                d3.max(values, function(c) '{' return 1.1 * d3.max(c.values,
+                                        function(v) '{' return v.y + v.y0; '}'); '}')
+              ]);
+            '}' else '{'
+              values = color.domain().map(function(name) '{'
+                return '{'
+                  name: name,
+                  values: data.map(function(d) '{'
+                    return '{'time: d.time, value: d[name]'}';
+                  '}')
+                '}'
+              '}');
+              xs[i].domain(d3.extent(data, function(d) '{' return d.time;'}'));
+              ys[i].domain([
+                d3.min(values, function(c) '{' return 0; '}'),
+                d3.max(values, function(c) '{' return 1.1 * d3.max(c.values,
+                                        function(v) '{' return v.value; '}'); '}')
+              ]);
+            '}'
+
+            svgs[i].append(''g'').attr(''class'', ''x axis'')
+              .attr(''transform'', ''translate(0,'' + height + '')'').call(xAxiss[i]);
+
+            svgs[i].append(''g'').attr(''class'', ''y axis'').call(yAxiss[i]);
+
+            var value = svgs[i].selectAll(''.path'')
+              .data(values).enter().append(''g'').attr(''class'', ''line'');
+
+            if(isAreas[i] == 1) '{'
+              value.append(''path'').attr(''class'', ''area'')
+                    .attr(''d'', function(d) '{'return lineAreas[i](d.values); '}')
+                    .style(''fill'', function(d) '{'return color(d.name); '}');
+            '}' else '{'
+              value.append(''path'').attr(''class'', ''line'')
+                    .attr(''d'', function(d) '{'return lineAreas[i](d.values); '}')
+                    .style(''stroke'', function(d) '{'return color(d.name); '}');
+            '}'
+
+            // legend
+            var legend = svgs[i].append(''g'')
+              .attr(''class'', ''legend'')
+              .attr(''x'', width + 5)
+              .attr(''y'', 25)
+              .attr(''height'', 120)
+              .attr(''width'', 140);
+            legend.selectAll(''g'').data(legends[i])
+              .enter()
+              .append(''g'')
+              .each(function(d, i) '{'
+                var g = d3.select(this);
+                g.append(''rect'')
+                  .attr(''x'', width + 5)
+                  .attr(''y'', i*20)
+                  .attr(''width'', 10)
+                  .attr(''height'', 10)
+                  .style(''fill'', color(d));
+                g.append(''text'')
+                  .attr(''x'', width + 25)
+                  .attr(''y'', i * 20 + 8)
+                  .attr(''height'',30)
+                  .attr(''width'',250)
+                  .style(''fill'', color(d))
+                  .text(d);
+              '}');
+            '}'
+
+            if(running == 1)
+              setTimeout(requestData, {3});
+          '}',
+          cache: false
+        '}');
+      '}'
+
+      // stop
+      function stop() '{'
+        running = 0;
+      '}'
+      requestData();
+    </script>
+  </body>
+</html>

+ 50 - 0
hadoop-tools/hadoop-sls/src/test/resources/simulate.info.html.template

@@ -0,0 +1,50 @@
+<html>
+  <head>
+    <meta charset="utf-8">
+    <style type="text/css">
+      .td1 '{'
+        border-width: 1px;
+        padding: 8px;
+        border-style: solid;
+        border-color: #666666;
+        background-color: #dedede;
+        width: 50%;
+      '}'
+      table.gridtable '{'
+        font-family: verdana,arial,sans-serif;
+        font-size:11px;
+        color:#333333;
+        border-width: 1px;
+        border-color: #666666;
+        border-collapse: collapse;
+        margin-top: 80px;
+      '}'
+      .td2 '{'
+        border-width: 1px;
+        padding: 8px;
+        border-style: solid;
+        border-color: #666666;
+        background-color: #ffffff;
+        width: 50%;
+      '}'
+    </style>
+  </head>
+  <body>
+    <table class="gridtable" align="center" width="400px">
+      <tr>
+        <td colspan="2" class="td2" align="center">
+          <b>SLS Simulate Information</b>
+        </td>
+      </tr>
+      {0}
+      <tr>
+        <td align="center" height="80px">
+          <a href="simulate">Simulation Charts</a>
+        </td>
+        <td align="center">
+          <a href="track">Tracked Jobs & Queues</a>
+        </td>
+      </tr>
+    </table>
+  </body>
+</html>

+ 81 - 0
hadoop-tools/hadoop-sls/src/test/resources/sls-runner.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<configuration>
+
+  <!-- SLSRunner configuration -->
+  <property>
+    <name>yarn.sls.runner.pool.size</name>
+    <value>100</value>
+  </property>
+  
+  <!-- Nodes configuration -->
+  <property>
+    <name>yarn.sls.nm.memory.mb</name>
+    <value>10240</value>
+  </property>
+  <property>
+    <name>yarn.sls.nm.vcores</name>
+    <value>10</value>
+  </property>
+  <property>
+    <name>yarn.sls.nm.heartbeat.interval.ms</name>
+    <value>1000</value>
+  </property>
+  
+  <!-- Apps configuration -->
+  <property>
+    <name>yarn.sls.am.heartbeat.interval.ms</name>
+    <value>1000</value>
+  </property>
+  <property>
+    <name>yarn.sls.am.type.mapreduce</name>
+    <value>org.apache.hadoop.yarn.sls.appmaster.MRAMSimulator</value>
+  </property>
+
+  <!-- Containers configuration -->
+  <property>
+    <name>yarn.sls.container.memory.mb</name>
+    <value>1024</value>
+  </property>
+  <property>
+    <name>yarn.sls.container.vcores</name>
+    <value>1</value>
+  </property>
+
+  <!--  metrics  -->
+  <property>
+    <name>yarn.sls.metrics.switch</name>
+    <value>ON</value>
+  </property>
+  <property>
+    <name>yarn.sls.metrics.web.address.port</name>
+    <value>10001</value>
+  </property>
+  <property>
+    <name>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler</name>
+    <value>org.apache.hadoop.yarn.sls.scheduler.FifoSchedulerMetrics</value>
+  </property>
+  <property>
+    <name>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler</name>
+    <value>org.apache.hadoop.yarn.sls.scheduler.FairSchedulerMetrics</value>
+  </property>
+  <property>
+    <name>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</name>
+    <value>org.apache.hadoop.yarn.sls.scheduler.CapacitySchedulerMetrics</value>
+  </property>
+  
+</configuration>

+ 193 - 0
hadoop-tools/hadoop-sls/src/test/resources/track.html.template

@@ -0,0 +1,193 @@
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
+    <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
+    <style type="text/css">
+      body '{' font: 20px sans-serif;'}'
+      .axis path,
+      .axis line '{' fill: none; stroke: #000; shape-rendering: crispEdges;'}'
+      .axis text '{' font-family: sans-serif; font-size: 20px; '}'
+      .line '{' fill: none; stroke: steelblue; stroke-width: 3px; '}'
+      .legend '{' padding: 5px; font: 18px sans-serif; background: yellow;
+                box-shadow: 2px 2px 1px #888;'}'
+      .title '{' font: 24px sans-serif; '}'
+      .divborder '{' border-width: 1px; border-style: solid; border-color: black;
+                    margin-top:10px '}'
+    </style>
+    <script src="js/thirdparty/d3.v3.js"></script>
+    <script src="js/thirdparty/jquery.js"></script>
+    <script src="js/thirdparty/bootstrap.min.js"></script>
+  </head>
+  <body>
+    <div class="row">
+      <div class="offset4 span8"><br/><br/><br/>
+        Select Tracked Job/Queue:
+        <select id="trackedSelect" onchange="redrawChart()">
+          <option>----Queue----</option>
+          {0}
+          <option>----Job----</option>
+          {1}
+        </select>
+        <input type="button" style="float: right;" value="Stop"
+               onClick="stop()" />
+      </div>
+    </div>
+    <div class="row">
+      <div class="divborder span9 offset4" id="area1"></div>
+    </div>
+    <script>
+      // global variables
+      var basetime = 0;
+      var running = 1;
+      var para = '''';
+      var data = [];
+      var path, line, svg;
+      var x, y;
+      var width, height;
+      var xAxis, yAxis;
+      var legends = [''usage.memory'', ''demand.memory'', ''maxshare.memory'',
+                      ''minshare.memory'', ''fairshare.memory''];
+
+      // stop function
+      function stop() '{'
+        running = 0;
+      '}'
+
+      // select changed event
+      function redrawChart() '{'
+        var value = $(''#trackedSelect'').val();
+        if (value.substring(0, ''Job ''.length) === ''Job ''
+                      || value.substring(0, ''Queue ''.length) === ''Queue '') '{'
+          para = value;
+          running = 0;
+          basetime = 0;
+          data = [];
+          $(''#area1'').empty();
+          drawChart(''Tracking '' + value);
+          running = 1;
+          requestData();
+        }
+      }
+
+      // draw chart
+      function drawChart(title) '{'
+        // location
+        var margin = '{'top: 50, right: 150, bottom: 50, left: 80'}';
+        width = 800 - margin.left - margin.right;
+        height = 420 - margin.top - margin.bottom;
+        x = d3.scale.linear().range([0, width]);
+        y = d3.scale.linear().range([height, 0]);
+        xAxis = d3.svg.axis().scale(x).orient(''bottom'');
+        yAxis = d3.svg.axis().scale(y).orient(''left'');
+        // lines
+        line = d3.svg.line().interpolate(''basis'')
+                .x(function(d) '{' return x(d.time); })
+                .y(function(d) '{' return y(d.value); });
+        // create chart
+        svg = d3.select(''#area1'').append(''svg'')
+                .attr(''width'', width + margin.left + margin.right)
+                .attr(''height'', height + margin.top + margin.bottom)
+                .append(''g'')
+                .attr(''transform'', ''translate('' + margin.left + '','' + margin.top + '')'');
+        // axis labels
+        svg.append(''text'')
+                .attr(''transform'', ''translate('' + (width / 2) + '','' + (height + margin.bottom - 5 ) + '')'')
+                .style(''text-anchor'', ''middle'')
+                .text(''Time ({2})'');
+        svg.append(''text'')
+                .attr(''transform'', ''rotate(-90)'')
+                .attr(''y'', 0 - margin.left)
+                .attr(''x'',0 - (height / 2))
+                .attr(''dy'', ''1em'')
+                .style(''text-anchor'', ''middle'')
+                .text(''Memory (GB)'');
+        // title
+        svg.append(''text'')
+                .attr(''x'', (width / 2))
+                .attr(''y'', 10 - (margin.top / 2))
+                .attr(''text-anchor'', ''middle'')
+                .text(title);
+      '}'
+
+      // request data
+      function requestData() '{'
+        $.ajax('{'url: ''trackMetrics?t='' + para,
+          success: function(point) '{'
+            // clear old
+            svg.selectAll(''g.tick'').remove();
+            svg.selectAll(''g'').remove();
+
+          if(basetime == 0)  basetime = point.time;
+          point.time = (point.time - basetime)/{3};
+          data.push(point);
+
+          var color = d3.scale.category10();
+          color.domain(d3.keys(data[0]).filter(function(key) '{'
+            return $.inArray(key, legends) !== -1;
+          '}'));
+
+          var values = color.domain().map(function(name) '{'
+            return '{'
+              name: name,
+              values: data.map(function(d) '{'
+                return '{' time: d.time, value: d[name]'}';
+              '}')
+            '}';
+          '}');
+
+          // set x/y range
+          x.domain(d3.extent(data, function(d) '{' return d.time; '}'));
+          y.domain([
+            d3.min(values, function(c) '{' return 0 '}'),
+            d3.max(values, function(c) '{' return 1.1 * d3.max(c.values, function(v) '{' return v.value; '}'); '}')
+          ]);
+
+          svg.append(''g'').attr(''class'', ''x axis'')
+            .attr(''transform'', ''translate(0,'' + height + '')'').call(xAxis);
+          svg.append(''g'').attr(''class'', ''y axis'').call(yAxis);
+          var value = svg.selectAll(''.path'')
+            .data(values).enter().append(''g'').attr(''class'', ''line'');
+
+          value.append(''path'').attr(''class'', ''line'')
+            .attr(''d'', function(d) '{'return line(d.values); '}')
+            .style(''stroke'', function(d) '{'return color(d.name); '}');
+
+          // legend
+          var legend = svg.append(''g'')
+            .attr(''class'', ''legend'')
+            .attr(''x'', width + 5)
+            .attr(''y'', 25)
+            .attr(''height'', 120)
+            .attr(''width'', 180);
+
+          legend.selectAll(''g'').data(legends)
+            .enter()
+            .append(''g'')
+            .each(function(d, i) '{'
+              var g = d3.select(this);
+              g.append(''rect'')
+                .attr(''x'', width + 5)
+                .attr(''y'', i * 20)
+                .attr(''width'', 10)
+                .attr(''height'', 10)
+                .style(''fill'', color(d));
+
+              g.append(''text'')
+                .attr(''x'', width + 25)
+                .attr(''y'', i * 20 + 8)
+                .attr(''height'',30)
+                .attr(''width'',250)
+                .style(''fill'', color(d))
+                .text(d);
+            '}');
+
+          if(running == 1)
+            setTimeout(requestData, {4});
+        '}',
+        cache: false
+      '}');
+    '}'
+  </script>
+</body>
+</html>

+ 58 - 0
hadoop-tools/hadoop-sls/src/test/resources/yarn-site.xml

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+<configuration>
+  <property>
+    <name>yarn.resourcemanager.scheduler.class</name>
+    <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler</value>
+  </property>
+
+  <property>
+    <description>The address of the RM web application.</description>
+    <name>yarn.resourcemanager.webapp.address</name>
+    <value>localhost:18088</value>
+  </property>
+
+  <property>
+    <name>yarn.resourcemanager.resource-tracker.address</name>
+    <value>localhost:18031</value>
+  </property>
+
+  <property>
+    <description>The address of the scheduler interface.</description>
+    <name>yarn.resourcemanager.scheduler.address</name>
+    <value>localhost:18030</value>
+  </property>
+
+  <property>
+    <description>The address of the applications manager interface in the RM.</description>
+    <name>yarn.resourcemanager.address</name>
+    <value>localhost:18032</value>
+  </property>
+
+  <property>
+    <description>The address of the RM admin interface.</description>
+    <name>yarn.resourcemanager.admin.address</name>
+    <value>localhost:18033</value>
+  </property>
+
+  <property>
+    <description>Set to false, to avoid ip check</description>
+    <name>hadoop.security.token.service.use_ip</name>
+    <value>false</value>
+  </property>
+
+</configuration>

+ 5 - 0
hadoop-tools/hadoop-tools-dist/pom.xml

@@ -83,6 +83,11 @@
       <scope>compile</scope>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-sls</artifactId>
+      <scope>compile</scope>
+    </dependency>
   </dependencies>
 
   <build>

+ 1 - 0
hadoop-tools/pom.xml

@@ -41,6 +41,7 @@
     <module>hadoop-extras</module>
     <module>hadoop-pipes</module>
     <module>hadoop-openstack</module>
+    <module>hadoop-sls</module>
   </modules>
 
   <build>

+ 2 - 0
hadoop-yarn-project/CHANGES.txt

@@ -24,6 +24,8 @@ Release 2.3.0 - UNRELEASED
     YARN-649. Added a new NM web-service to serve container logs in plain text
     over HTTP. (Sandy Ryza via vinodkv)
 
+    YARN-1021. Yarn Scheduler Load Simulator. (ywskycn via tucu)
+
   IMPROVEMENTS
 
     YARN-905. Add state filters to nodes CLI (Wei Yan via Sandy Ryza)

部分文件因文件數量過多而無法顯示