Permalink
Browse files

FLUME-345/FLUME-307: asciidoc build with no GPL js / use build autoge…

…nerate build version strings

- remove unused master-empty.png
- update build.xml to use non GPL docs build chain
- Updates to auto gen version numbers, dates
- add web stuff
- add autogenerate index page
  • Loading branch information...
1 parent 59ab84f commit e7021257da5f379b04f01838ab07a600b889459b @jmhsieh jmhsieh committed Nov 16, 2010
View
@@ -16,6 +16,6 @@ libtest/
lib/ivy-*.jar
src/avro-gen-java
src/avro/*.avpr
-docs/
+/docs/
.eclipse
pmd_report.html
View
@@ -4,7 +4,7 @@ Flume 0.9.3 (Unreleased)
Flume 0.9.2
===========
-Mulitple masters does not work in conjunction with automatic failover
+Multiple masters does not work in conjunction with automatic failover
chains configurations.
This version significantly reduces the chances of data duplication
View
@@ -160,6 +160,8 @@ to call at top-level: ant deploy-contrib compile-core-test
<mkdir dir="${basedir}/libtest"/>
<mkdir dir="${build.docs}"/>
<mkdir dir="${build.docs}/DeveloperGuide"/>
+ <mkdir dir="${build.docs}/UserGuide"/>
+ <mkdir dir="${build.docs}/Cookbook"/>
<mkdir dir="${ivy.tools.lib}"/>
<condition property="ivy.jar.exists">
@@ -182,7 +184,7 @@ to call at top-level: ant deploy-contrib compile-core-test
<exclude name="**/*.jsp" />
</fileset>
</copy>
-
+ <tstamp/>
</target>
@@ -726,50 +728,113 @@ to call at top-level: ant deploy-contrib compile-core-test
</target>
<!-- ================================================================== -->
- <!-- Make Docs (UserGuide, cookbook, DeveloperGuide) -->
+ <!-- Make Docs (UserGuide, Cookbook, DeveloperGuide) -->
+ <!-- converts to docbook and then to html to avoid GPL code insertion -->
<!-- in ubuntu requires pkgs: asciidoc,source-highlight,graphviz -->
<!-- ================================================================== -->
- <target name="docs" depends="userguide,cookbook,developerguide" description="Build documentation"/>
+ <target name="docs" depends="userguide,cookbook,developerguide,docindex" description="Build documentation"/>
<uptodate property="userguide.uptodate"
- targetfile="${build.docs}/UserGuide.html">
+ targetfile="${build.docs}/UserGuide/index.html">
<srcfiles dir="${docs.src.dir}/UserGuide" includes="*"/>
+ <srcfiles dir="${docs.src.dir}/web" includes="*"/>
</uptodate>
<uptodate property="cookbook.uptodate"
- targetfile="${build.docs}/Cookbook.html" >
+ targetfile="${build.docs}/Cookbook/index.html" >
<srcfiles dir="${docs.src.dir}/cookbook" includes="*"/>
+ <srcfiles dir="${docs.src.dir}/web" includes="*"/>
+ </uptodate>
+ <uptodate property="developerguide.uptodate"
+ targetfile="${build.docs}/DeveloperGuide/index.html" >
+ <srcfiles dir="${docs.src.dir}/DeveloperGuide" includes="*"/>
+ <srcfiles dir="${docs.src.dir}/web" includes="*"/>
+ </uptodate>
+ <uptodate property="docindex.uptodate"
+ targetfile="${build.docs}/index.html" >
+ <srcfiles dir="${docs.src.dir}/web" includes="*"/>
</uptodate>
+
<target name="userguide" depends="init" description="Build UserGuide" unless="userguide.uptodate" >
<exec executable="asciidoc" dir="${basedir}" failonerror="true">
- <arg line="-a toc -o ${build.docs}/UserGuide.html ${docs.src.dir}/UserGuide/FullGuide"/>
+ <arg line="-a revnumber=${version} -a revdate='${TODAY}' -b docbook -o ${build.docs}/UserGuide/index.xml ${docs.src.dir}/UserGuide/FullGuide"/>
</exec>
- <copy todir="${docs.dir}">
+ <exec executable="xmlto" dir="${basedir}" failonerror="true">
+ <arg line="--skip-validation -o ${build.docs}/UserGuide -m src/docs/web/html.xsl html-nochunks ${build.docs}/UserGuide/index.xml "/>
+ </exec>
+
+ <delete file="${build.docs}/UserGuide/index.xml" />
+
+ <copy todir="${docs.dir}/UserGuide">
+ <fileset dir="${docs.src.dir}/web" includes="**"/>
+ </copy>
+
+ <copy todir="${docs.dir}/UserGuide">
<fileset dir="${docs.src.dir}/UserGuide" includes="**/*.png"/>
</copy>
</target>
<target name="cookbook" depends="init" description="Build documentation" unless="cookbook.uptodate">
<exec executable="asciidoc" dir="${basedir}" failonerror="true">
- <arg line="-a toc -o ${build.docs}/Cookbook.html ${docs.src.dir}/cookbook/Cookbook"/>
+ <arg line="-a revnumber=${version} -a revdate='${TODAY}' -b docbook -o ${build.docs}/Cookbook/index.xml ${docs.src.dir}/cookbook/Cookbook"/>
</exec>
- <copy todir="${docs.dir}">
+ <exec executable="xmlto" dir="${basedir}" failonerror="true">
+ <arg line="--skip-validation -o ${build.docs}/Cookbook -m src/docs/web/html.xsl html-nochunks ${build.docs}/Cookbook/index.xml "/>
+ </exec>
+
+ <delete file="${build.docs}/cookbook/index.xml" />
+
+ <copy todir="${docs.dir}/Cookbook">
+ <fileset dir="${docs.src.dir}/web" includes="**"/>
+ </copy>
+
+ <copy todir="${docs.dir}/Cookbook">
<fileset dir="${docs.src.dir}/cookbook" includes="**/*.png"/>
</copy>
</target>
- <target name="developerguide" depends="init" description="Build DeveloperGuide">
+ <target name="developerguide" depends="init" description="Build DeveloperGuide" unless="developerguide.uptodate">
<exec executable="asciidoc" dir="${basedir}" failonerror="true">
- <arg line="-a toc -o ${build.docs}/DeveloperGuide/index.html ${docs.src.dir}/DeveloperGuide/FullGuide"/>
+ <arg line="-a revnumber=${version} -a revdate='${TODAY}' -b docbook -o ${build.docs}/DeveloperGuide/index.xml ${docs.src.dir}/DeveloperGuide/FullGuide"/>
+ </exec>
+
+ <exec executable="xmlto" dir="${basedir}" failonerror="true">
+ <arg line="--skip-validation -o ${build.docs}/DeveloperGuide -m src/docs/web/html.xsl html-nochunks ${build.docs}/DeveloperGuide/index.xml "/>
</exec>
+ <delete file="${build.docs}/DeveloperGuide/index.xml" />
+
+ <copy todir="${docs.dir}/DeveloperGuide">
+ <fileset dir="${docs.src.dir}/web" includes="**"/>
+ </copy>
+
<copy todir="${docs.dir}/DeveloperGuide">
<fileset dir="${docs.src.dir}/DeveloperGuide" includes="**/*.png"/>
</copy>
</target>
+
+ <target name="docindex" depends="init" description="Build Index Page for docs" unless="docindex.uptodate">
+ <exec executable="asciidoc" dir="${basedir}" failonerror="true">
+ <arg line="-a revnumber=${version} -a revdate='${TODAY}' -b docbook -o ${build.docs}/index.xml ${docs.src.dir}/web/index.txt"/>
+ </exec>
+
+ <exec executable="xmlto" dir="${basedir}" failonerror="true">
+ <arg line="--skip-validation -o ${build.docs} -m src/docs/web/html.xsl html-nochunks ${build.docs}/index.xml "/>
+ </exec>
+
+ <delete file="${build.docs}/index.xml" />
+
+ <!-- there are 4 copies of this. super inefficient -->
+ <copy todir="${docs.dir}">
+ <fileset dir="${docs.src.dir}/web" includes="**"/>
+ </copy>
+
+ </target>
+
+
<!-- ================================================================== -->
<!-- Make flume.tgz -->
@@ -1,7 +1,8 @@
Flume Developer Guide
=====================
flume-dev@cloudera.org
-v0.9.3-SNAPSHOT, December 2010
+
+// version number comes from command line.
////////////////////
Licensed to Cloudera, Inc. under one
@@ -1,7 +1,8 @@
Flume User Guide
=================
flume-dev@cloudera.org
-v0.9.3-SNAPSHOT, December 2010
+
+// version number comes from command line.
////////////////////
Licensed to Cloudera, Inc. under one
@@ -192,12 +192,13 @@ default :: a debugging format.
=== Small Files Compared to High Latency
-For all versions Hadoop's file system that are {lt}= 0.20.x, HDFS has write-once
-read-many semantics. Thus, the only way to reliably flush an HDFS file is
-to close the file. Moreover, once a file is closed, no new data can be
-appended to the file. This presents a tension between getting data written
-quickly to HDFS and potentially having many small files (which is a potential
-scalability bottleneck of HDFS).
+For all versions Hadoop's file system that are earlier than 0.20.x,
+HDFS has write-once read-many semantics. Thus, the only way to
+reliably flush an HDFS file is to close the file. Moreover, once a
+file is closed, no new data can be appended to the file. This
+presents a tension between getting data written quickly to HDFS and
+potentially having many small files (which is a potential scalability
+bottleneck of HDFS).
On one side, to minimize the load and data stored throughput the system,
ideally one would flush data to HDFS as soon as it arrives. Flushing
Deleted file not rendered
@@ -1,7 +1,8 @@
Flume Cookbook
===============
flume-dev@cloudera.org
-v0.9.3-SNAPSHOT, December 2010
+
+// version number comes from command line.
////////////////////
Licensed to Cloudera, Inc. under one
@@ -0,0 +1,47 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.0"
+ exclude-result-prefixes="exsl">
+
+<!--
+ Licensed to Cloudera, Inc. under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ Cloudera, Inc. 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.
+-->
+
+<xsl:template name="breadcrumbs">
+ <xsl:param name="this.node" select="."/>
+ <div class="breadcrumbs">
+ <xsl:for-each select="$this.node/ancestor::*">
+ <span class="breadcrumb-link">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ <xsl:with-param name="context" select="$this.node"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="." mode="title.markup"/>
+ </a>
+ </span>
+ <xsl:text> &gt; </xsl:text>
+ </xsl:for-each>
+ <!-- And display the current node, but not as a link -->
+ <span class="breadcrumb-node">
+ <xsl:apply-templates select="$this.node" mode="title.markup"/>
+ </span>
+ </div>
+</xsl:template>
+
+</xsl:stylesheet>
Oops, something went wrong.

0 comments on commit e702125

Please sign in to comment.