You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2015/07/28 14:04:13 UTC
[3/3] jena git commit: Only check SORT_TEMP_DIR if discoverable
(JENA-977)
Only check SORT_TEMP_DIR if discoverable (JENA-977)
In some environments tdbloader2index may not be able to figure out what
the sort temp directory is going to be in which case we should skip
trying to check the available space on it
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/290c6639
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/290c6639
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/290c6639
Branch: refs/heads/master
Commit: 290c66394b132ad03ac70ddbcfe190900a442290
Parents: a426799
Author: Rob Vesse <rv...@apache.org>
Authored: Tue Jul 28 13:03:17 2015 +0100
Committer: Rob Vesse <rv...@apache.org>
Committed: Tue Jul 28 13:03:17 2015 +0100
----------------------------------------------------------------------
apache-jena/bin/tdbloader2index | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/290c6639/apache-jena/bin/tdbloader2index
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdbloader2index b/apache-jena/bin/tdbloader2index
index eca1aae..d26072f 100755
--- a/apache-jena/bin/tdbloader2index
+++ b/apache-jena/bin/tdbloader2index
@@ -298,17 +298,20 @@ else
# Using the system temp directory
SORT_TEMP_DIR="$TMPDIR"
fi
-SORT_TEMP_DIR=$(makeAbsolute "$SORT_TEMP_DIR")
-debug "Sort Temp Directory: $SORT_TEMP_DIR"
-SORT_DRIVE_INFO=($(getDriveInfo "${SORT_TEMP_DIR}"))
-if [ "${#SORT_DRIVE_INFO[@]}" -gt 0 ]; then
- debug "Sort Temp Directory is on disk ${SORT_DRIVE_INFO[0]} which has ${SORT_DRIVE_INFO[2]}% free space (${SORT_DRIVE_INFO[3]} bytes)"
-
- if [ "${SORT_DRIVE_INFO[2]}" -le 10 ]; then
- warn "-----"
- warn "Sort Temp Directory ${SORT_TEMP_DIR} is on disk ${SORT_DRIVE_INFO[0]} which only has ${SORT_DRIVE_INFO[2]}% free space (${SORT_DRIVE_INFO[3]} bytes) available"
- warn "This may result in sort failures if the data to be indexed is large"
- warn "-----"
+if [ -n "$SORT_TEMP_DIR" ]; then
+ # If we've figured out the sort temporary directory then check it
+ SORT_TEMP_DIR=$(makeAbsolute "$SORT_TEMP_DIR")
+ debug "Sort Temp Directory: $SORT_TEMP_DIR"
+ SORT_DRIVE_INFO=($(getDriveInfo "${SORT_TEMP_DIR}"))
+ if [ "${#SORT_DRIVE_INFO[@]}" -gt 0 ]; then
+ debug "Sort Temp Directory is on disk ${SORT_DRIVE_INFO[0]} which has ${SORT_DRIVE_INFO[2]}% free space (${SORT_DRIVE_INFO[3]} bytes)"
+
+ if [ "${SORT_DRIVE_INFO[2]}" -le 10 ]; then
+ warn "-----"
+ warn "Sort Temp Directory ${SORT_TEMP_DIR} is on disk ${SORT_DRIVE_INFO[0]} which only has ${SORT_DRIVE_INFO[2]}% free space (${SORT_DRIVE_INFO[3]} bytes) available"
+ warn "This may result in sort failures if the data to be indexed is large"
+ warn "-----"
+ fi
fi
fi