-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ddlog update #376
Ddlog update #376
Conversation
@feiranwang Is this waiting @netj approval? He should be assigned :) |
@@ -91,6 +91,15 @@ fullConfig=$run_dir/deepdive.conf | |||
ddlog compile "${ddlogFiles[@]}" | |||
export PIPELINE= # XXX ddlog shouldn't emit this | |||
: ${Pipeline:=endtoend} | |||
|
|||
# set PARALLELISM env var, use max parallelism if the variable is not set | |||
if [[ $(uname) = 'Linux' ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking if nproc
or sysctl
is available makes more sense than relying on uname. You could chain the options with something like:
: ${PARALLELISM:=$({
# Linux typically has coreutils which includes nproc
nproc ||
# OS X
sysctl -n hw.ncpu ||
# fall back to 1
echo 1
} 2>/dev/null)}
Doesn't
In any case, DD should first make sure the database is created. |
@@ -16,8 +16,19 @@ db-init "$@" | |||
|
|||
# make sure the necessary tables are all created | |||
if [[ -e app.ddlog ]]; then | |||
# TODO export schema.sql from ddlog instead of running initdb pipeline | |||
deepdive-run initdb | |||
if [[ $# -gt 0 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than having these argument count checks buried deep inside, I think it's much clearer to define initdb's behavior entirely differently when arguments are specified. Please see my comment on the PR for reorganizing.
Nice updates. Please see my comments. |
Thanks! Will update accordingly. |
@netj Updated. Thanks! |
30fda2e
to
2bec633
Compare
Looks good, merging. |
deepdive initdb TABLE
command for initializing a single table.