Changeset: 9ad8b922c870 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ad8b922c870
Modified Files:
sql/backends/monet5/bam/85_bam.sql
sql/backends/monet5/bam/Tests/sql/bam_loader_files.sql
sql/backends/monet5/bam/Tests/sql/bam_loader_repos.sql
sql/backends/monet5/bam/bam.mal
sql/backends/monet5/bam/bam_loader.c
Branch: bamloader
Log Message:
Hard code number of threads instead of letting the user decide this on SQL level
diffs (81 lines):
diff --git a/sql/backends/monet5/bam/85_bam.sql
b/sql/backends/monet5/bam/85_bam.sql
--- a/sql/backends/monet5/bam/85_bam.sql
+++ b/sql/backends/monet5/bam/85_bam.sql
@@ -1,9 +1,9 @@
CREATE SCHEMA bam;
-CREATE PROCEDURE bam.bam_loader_repos(bam_repos STRING, dbschema SMALLINT,
nr_threads SMALLINT)
+CREATE PROCEDURE bam.bam_loader_repos(bam_repos STRING, dbschema SMALLINT)
EXTERNAL NAME bam.bam_loader_repos;
-CREATE PROCEDURE bam.bam_loader_files(bam_files STRING, dbschema SMALLINT,
nr_threads SMALLINT)
+CREATE PROCEDURE bam.bam_loader_files(bam_files STRING, dbschema SMALLINT)
EXTERNAL NAME bam.bam_loader_files;
CREATE PROCEDURE bam.bam_loader_file(bam_file STRING, dbschema SMALLINT)
diff --git a/sql/backends/monet5/bam/Tests/sql/bam_loader_files.sql
b/sql/backends/monet5/bam/Tests/sql/bam_loader_files.sql
--- a/sql/backends/monet5/bam/Tests/sql/bam_loader_files.sql
+++ b/sql/backends/monet5/bam/Tests/sql/bam_loader_files.sql
@@ -1,3 +1,3 @@
-CALL bam.bam_loader_files('PWD/files.lst', 0, 4);
-CALL bam.bam_loader_files('PWD/files_qname.lst', 1, 4);
-CALL bam.bam_loader_files('PWD/files_many.lst', 0, 4);
+CALL bam.bam_loader_files('PWD/files.lst', 0);
+CALL bam.bam_loader_files('PWD/files_qname.lst', 1);
+CALL bam.bam_loader_files('PWD/files_many.lst', 0);
diff --git a/sql/backends/monet5/bam/Tests/sql/bam_loader_repos.sql
b/sql/backends/monet5/bam/Tests/sql/bam_loader_repos.sql
--- a/sql/backends/monet5/bam/Tests/sql/bam_loader_repos.sql
+++ b/sql/backends/monet5/bam/Tests/sql/bam_loader_repos.sql
@@ -1,3 +1,3 @@
# Load files
-CALL bam.bam_loader_repos('PWD/files', 0, 4);
-CALL bam.bam_loader_repos('PWD/files/queryname', 1, 4);
\ No newline at end of file
+CALL bam.bam_loader_repos('PWD/files', 0);
+CALL bam.bam_loader_repos('PWD/files/queryname', 1);
\ No newline at end of file
diff --git a/sql/backends/monet5/bam/bam.mal b/sql/backends/monet5/bam/bam.mal
--- a/sql/backends/monet5/bam/bam.mal
+++ b/sql/backends/monet5/bam/bam.mal
@@ -3,11 +3,11 @@ module bam;
# Bam loader related signatures
-pattern bam_loader_repos(bam_repos:str, dbschema:sht, nr_threads:sht):void
+pattern bam_loader_repos(bam_repos:str, dbschema:sht):void
address bam_loader_repos
comment "Read all bam files in the given bam_repos directory (non-recursive)
and store them in the given dbschema";
-pattern bam_loader_files(bam_files:str, dbschema:sht, nr_threads:sht):void
+pattern bam_loader_files(bam_files:str, dbschema:sht):void
address bam_loader_files
comment "Read all bam files in the file list stored in the file bam_files
(separated by a newline) and store them in the given dbschema";
diff --git a/sql/backends/monet5/bam/bam_loader.c
b/sql/backends/monet5/bam/bam_loader.c
--- a/sql/backends/monet5/bam/bam_loader.c
+++ b/sql/backends/monet5/bam/bam_loader.c
@@ -419,8 +419,10 @@ bam_loader_repos(Client cntxt, MalBlkPtr
str bam_repos = *getArgReference_str(stk, pci, pci->retc);
/* arg 2: dbschema to use */
sht dbschema = *getArgReference_sht(stk, pci, pci->retc + 1);
- /* arg 3: max number of threads that will be used by bam_loader */
- sht nr_threads = *getArgReference_sht(stk, pci, pci->retc + 2);
+ /* For now, we hard code the number of threads, since the SQL
+ level should not bother with this */
+
+ sht nr_threads = 4;
str *filenames = NULL;
int nr_files = 0;
@@ -539,8 +541,9 @@ bam_loader_files(Client cntxt, MalBlkPtr
str bam_files = *getArgReference_str(stk, pci, pci->retc);
/* arg 2: dbschema to use */
sht dbschema = *getArgReference_sht(stk, pci, pci->retc + 1);
- /* arg 3: max number of threads that will be used by bam_loader */
- sht nr_threads = *getArgReference_sht(stk, pci, pci->retc + 2);
+ /* For now, we hard code the number of threads, since the SQL
+ level should not bother with this */
+ sht nr_threads = 4;
str *filenames = NULL;
int nr_files = 0;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list