You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2019/07/11 12:58:26 UTC

[kudu] branch branch-1.10.x updated (c64aa01 -> 567782e)

This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a change to branch branch-1.10.x
in repository https://gitbox.apache.org/repos/asf/kudu.git.


    from c64aa01  [web] add HMS docs to the side menu
     new 8d98b65  Fix KuduScanTokenBuilder::SetDiffScan docs
     new 567782e  [docs] Update the site build to use the release directory

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/support/scripts/make_docs.sh | 16 ++++++++++---
 docs/support/scripts/make_site.sh | 49 ++++++++++++++++++++++++++++++++-------
 src/kudu/client/client.h          | 19 ++++++++++++++-
 3 files changed, 72 insertions(+), 12 deletions(-)


[kudu] 01/02: Fix KuduScanTokenBuilder::SetDiffScan docs

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch branch-1.10.x
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 8d98b65b433df8e2e111abc07456ac493254fcc7
Author: Grant Henke <gr...@apache.org>
AuthorDate: Wed Jul 10 16:04:19 2019 -0500

    Fix KuduScanTokenBuilder::SetDiffScan docs
    
    It looks like Doxygen can’t use `@copydoc` when
    the doc being copied is in a `@cond PRIVATE_API`.
    
    Change-Id: I448c00b78f9d14685e87d154e1bbee0eaa8e8e24
    Reviewed-on: http://gerrit.cloudera.org:8080/13837
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    (cherry picked from commit 0b4948ea3beac43a0dcd2ae2933440d089e337fd)
    Reviewed-on: http://gerrit.cloudera.org:8080/13839
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
 src/kudu/client/client.h | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/kudu/client/client.h b/src/kudu/client/client.h
index 2ef8da5..20c3440 100644
--- a/src/kudu/client/client.h
+++ b/src/kudu/client/client.h
@@ -2431,10 +2431,27 @@ class KUDU_EXPORT KuduScanTokenBuilder {
   /// @copydoc KuduScanner::SetSnapshotRaw
   Status SetSnapshotRaw(uint64_t snapshot_timestamp) WARN_UNUSED_RESULT;
 
-  /// @copydoc KuduScanner::SetDiffScan
+  /// @cond PRIVATE_API
+
+  /// Set the start and end timestamp for a diff scan. The timestamps should be
+  /// encoded HT timestamps.
+  ///
+  /// Additionally sets any other scan properties required by diff scans.
+  ///
+  /// Private API.
+  ///
+  /// @param [in] start_timestamp
+  ///   Start timestamp to set in raw encoded form
+  ///   (i.e. as returned by a previous call to a server).
+  /// @param [in] end_timestamp
+  ///   End timestamp to set in raw encoded form
+  ///   (i.e. as returned by a previous call to a server).
+  /// @return Operation result status.
   Status SetDiffScan(uint64_t start_timestamp, uint64_t end_timestamp)
       WARN_UNUSED_RESULT KUDU_NO_EXPORT;
 
+  /// @endcond
+
   /// @copydoc KuduScanner::SetTimeoutMillis
   Status SetTimeoutMillis(int millis) WARN_UNUSED_RESULT;
 


[kudu] 02/02: [docs] Update the site build to use the release directory

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch branch-1.10.x
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 567782e0377c554433970b66f7a66f62783b8b8d
Author: Grant Henke <gr...@apache.org>
AuthorDate: Wed Jul 10 12:21:14 2019 -0500

    [docs] Update the site build to use the release directory
    
    Updates the make_site.sh script and make_docs.sh script
    to generate docs in the versioned release directory. This
    matches the new symbolic linking style we have been
    using for the docs and avoids the need to manually copy
    the docs during release.
    
    An additional flag to skip updating the symbolic links (`—no-link`) was added.
    
    Change-Id: I174de2d7041bba20cdc3dcacd3efbb5e736ecb63
    Reviewed-on: http://gerrit.cloudera.org:8080/13835
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
    Tested-by: Andrew Wong <aw...@cloudera.com>
    (cherry picked from commit 819a85fbb1d836f70a50c136dfcdaebc37faf7a8)
    Reviewed-on: http://gerrit.cloudera.org:8080/13840
    Tested-by: Kudu Jenkins
---
 docs/support/scripts/make_docs.sh | 16 ++++++++++---
 docs/support/scripts/make_site.sh | 49 ++++++++++++++++++++++++++++++++-------
 2 files changed, 54 insertions(+), 11 deletions(-)

diff --git a/docs/support/scripts/make_docs.sh b/docs/support/scripts/make_docs.sh
index b9837ba..1b0b742 100755
--- a/docs/support/scripts/make_docs.sh
+++ b/docs/support/scripts/make_docs.sh
@@ -31,7 +31,7 @@
 set -e
 
 usage() {
-  echo usage: "$0 --build_root <path to build root> [--site <path to gh-pages checkout>]"
+  echo usage: "$0 --build_root <path> --output_subdir <relative path> [--site <path to gh-pages checkout>]"
 }
 
 while [[ $# > 0 ]] ; do
@@ -60,7 +60,15 @@ while [[ $# > 0 ]] ; do
           exit 1
         fi
         SITE=$(cd $SITE && pwd)
-        OUTPUT_DIR=$SITE/docs
+        ;;
+      --output_subdir|-o)
+        OUTPUT_SUBDIR=$2
+        if [ -z "$OUTPUT_SUBDIR" ]; then
+          usage
+          exit 1
+        fi
+        shift
+        shift
         ;;
       --no-jekyll)
         NO_JEKYLL=1
@@ -78,7 +86,9 @@ if [ -z "$BUILD_ROOT" ]; then
 fi
 
 if [ -z "$SITE" ]; then
-  OUTPUT_DIR=$BUILD_ROOT/docs
+  OUTPUT_DIR=$BUILD_ROOT/$OUTPUT_SUBDIR
+else
+  OUTPUT_DIR=$SITE/$OUTPUT_SUBDIR
 fi
 
 GEN_DOC_DIR=$BUILD_ROOT/gen-docs
diff --git a/docs/support/scripts/make_site.sh b/docs/support/scripts/make_site.sh
index e6cd7f3..0d7d738 100755
--- a/docs/support/scripts/make_site.sh
+++ b/docs/support/scripts/make_site.sh
@@ -24,17 +24,22 @@ set -e
 
 BUILD_TYPE=release
 SOURCE_ROOT=$(cd $(dirname $0)/../../..; pwd)
+VERSION=$(cat $SOURCE_ROOT/version.txt)
 BUILD_ROOT="$SOURCE_ROOT/build/$BUILD_TYPE"
 SITE_OUTPUT_DIR="$BUILD_ROOT/site"
+RELEASE_SUBDIR=releases/$VERSION
+RELEASE_OUTPUT_DIR="$SITE_OUTPUT_DIR/releases/$VERSION"
 
 OPT_DOXYGEN=1 # By default, build doxygen docs.
 OPT_JAVADOC=1 # By default, build javadocs.
+OPT_LINK=1 # By default, update the top level symbolic links.
 OPT_FORCE='' # By default, don't overwrite the destination directory.
 
 usage() {
   echo "Usage: $0 [--no-doxygen] [--no-javadoc] [--force]"
   echo "Specify --no-doxygen to skip generation of the C++ client API docs"
   echo "Specify --no-javadoc to skip generation of the Java API docs"
+  echo "Specify --no-link to skip updating the top level symbolic links"
   echo "Specify --force to overwrite the destination directory, if it exists"
   exit 1
 }
@@ -44,6 +49,7 @@ if [ $# -gt 0 ]; then
     case $arg in
       "--no-doxygen")  OPT_DOXYGEN='' ;;
       "--no-javadoc")  OPT_JAVADOC='' ;;
+      "--no-link")     OPT_LINK='' ;;
       "--force")       OPT_FORCE=1 ;;
       "--help")        usage ;;
       "-h")            usage ;;
@@ -96,16 +102,27 @@ if [ -d "$SITE_OUTPUT_DIR" -a -n "$OPT_FORCE" ]; then
 fi
 git clone -q "$GIT_REMOTE" --reference "$SOURCE_ROOT" -b gh-pages --depth 1 "$SITE_OUTPUT_DIR"
 
+# Make the RELEASE_OUTPUT_DIR in case it doesn't exist.
+mkdir -p "$RELEASE_OUTPUT_DIR"
+
 # Build the docs using the styles from the Jekyll site
-rm -Rf "$SITE_OUTPUT_DIR/docs"
-$SOURCE_ROOT/docs/support/scripts/make_docs.sh --build_root $BUILD_ROOT --site "$SITE_OUTPUT_DIR"
-if [ -f "$SITE_OUTPUT_DIR/docs/index.html" ]; then
+DOC_SUBDIR="docs"
+rm -Rf "$RELEASE_OUTPUT_DIR/$DOC_SUBDIR"
+$SOURCE_ROOT/docs/support/scripts/make_docs.sh --build_root $BUILD_ROOT --site "$SITE_OUTPUT_DIR" \
+                                               --output_subdir "$RELEASE_SUBDIR/$DOC_SUBDIR"
+if [ -f "$RELEASE_OUTPUT_DIR/docs/index.html" ]; then
   echo "Successfully built docs."
 else
   echo "Docs failed to build."
   exit 1
 fi
 
+if [ -n "$OPT_LINK" ]; then
+  # Update the top level docs symbolic link.
+  rm "$SITE_OUTPUT_DIR/$DOC_SUBDIR"
+  ln -s "$RELEASE_SUBDIR/$DOC_SUBDIR" "$SITE_OUTPUT_DIR/$DOC_SUBDIR"
+fi
+
 if [ -n "$OPT_JAVADOC" ]; then
   JAVADOC_SUBDIR="apidocs"
   cd "$SOURCE_ROOT/java"
@@ -122,14 +139,26 @@ if [ -n "$OPT_JAVADOC" ]; then
     exit 1
   fi
 
-  rm -Rf "$SITE_OUTPUT_DIR/$JAVADOC_SUBDIR"
-  cp -a "$SOURCE_ROOT/java/build/docs/javadoc/." "$SITE_OUTPUT_DIR/$JAVADOC_SUBDIR"
+  rm -Rf "$RELEASE_OUTPUT_DIR/$JAVADOC_SUBDIR"
+  cp -a "$SOURCE_ROOT/java/build/docs/javadoc/." "$RELEASE_OUTPUT_DIR/$JAVADOC_SUBDIR"
+
+  if [ -n "$OPT_LINK" ]; then
+    # Update the top level javadoc symbolic link.
+    rm "$SITE_OUTPUT_DIR/$JAVADOC_SUBDIR"
+    ln -s "$RELEASE_SUBDIR/$JAVADOC_SUBDIR" "$SITE_OUTPUT_DIR/$JAVADOC_SUBDIR"
+  fi
 fi
 
 if [ -n "$OPT_DOXYGEN" ]; then
   CPP_CLIENT_API_SUBDIR="cpp-client-api"
-  rm -Rf "$SITE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
-  cp -a "$BUILD_ROOT/docs/doxygen/client_api/html" "$SITE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
+  rm -Rf "$RELEASE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
+  cp -a "$BUILD_ROOT/docs/doxygen/client_api/html" "$RELEASE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
+
+  if [ -n "$OPT_LINK" ]; then
+    # Update the top level cpp-client-api symbolic link.
+    rm "$SITE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
+    ln -s "$RELEASE_SUBDIR/$CPP_CLIENT_API_SUBDIR" "$SITE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
+  fi
 fi
 
 SITE_SUBDIRS="docs"
@@ -142,9 +171,13 @@ fi
 
 cd "$SITE_OUTPUT_DIR"
 SITE_ARCHIVE="$SITE_OUTPUT_DIR/website_archive.zip"
-zip -rq "$SITE_ARCHIVE" $SITE_SUBDIRS
+zip -rq "$SITE_ARCHIVE" "$RELEASE_OUTPUT_DIR"
 
 set +x
 echo "Generated web site at $SITE_OUTPUT_DIR"
+echo "Release documentation generated at $RELEASE_OUTPUT_DIR"
+if [ -n "$OPT_LINK" ]; then
+  echo "Top level symbolic links were updated"
+fi
 echo "Docs zip generated at $SITE_ARCHIVE"
 echo "To view live site locally, run: (cd $SITE_OUTPUT_DIR && ./site_tool jekyll serve)"