Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apache-jena/bin/tdbloader2
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ KEEP_WORK=0
DEBUG=0
TRACE=0
JVM_ARGS=
SORT_ARGS=

while [ $# -gt 0 ]
do
Expand Down
22 changes: 13 additions & 9 deletions apache-jena/bin/tdbloader2index
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ LOC=
KEEP_WORK=0
DEBUG=0
JVM_ARGS=
SORT_ARGS=
SORT_ARGS="${SORT_ARGS:-}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use SORT_ARGS="${SORT_ARGS:-}" to set to environment or empty string.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I'll fix this.

if [ -n "$SORT_ARGS" ]; then
echo "Using SORT_ARGS: $SORT_ARGS"
fi

while [ $# -gt 0 ]
do
Expand Down Expand Up @@ -241,15 +244,16 @@ debug "Data text files are $DATA_TRIPLES and $DATA_QUADS"
# Prepare sort arguments
if [ -z "$SORT_ARGS" ]; then
SORT_ARGS="--buffer-size=50%"

# --parallel is not always available.
# Temporarily disable exit on error while we check for --parallel support
set +e
sort --parallel=3 < /dev/null 2>/dev/null
if [ $? = 0 ]; then
SORT_ARGS="$SORT_ARGS --parallel=3"
if [[ "$SORT_ARGS" != *"--parallel="* ]]; then
# --parallel is not always available.
# Temporarily disable exit on error while we check for --parallel support
set +e
sort --parallel=3 < /dev/null 2>/dev/null
if [ $? = 0 ]; then
SORT_ARGS="$SORT_ARGS --parallel=3"
fi
set -e
fi
set -e
fi

# Prepare JVM arguments
Expand Down