Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HEPnOS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
HEP
HEPnOS
Commits
f1ef1c30
Commit
f1ef1c30
authored
Apr 10, 2018
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
can create datasets
parent
651208a7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
include/hepnos/DataStore.hpp
include/hepnos/DataStore.hpp
+1
-1
src/DataStore.cpp
src/DataStore.cpp
+15
-3
test/example.cpp
test/example.cpp
+3
-1
No files found.
include/hepnos/DataStore.hpp
View file @
f1ef1c30
...
...
@@ -26,7 +26,7 @@ class DataStore {
iterator
find
(
const
std
::
string
&
datasetName
);
inline
const_iterator
find
(
const
std
::
string
&
datasetName
)
const
;
const_iterator
find
(
const
std
::
string
&
datasetName
)
const
;
iterator
begin
();
...
...
src/DataStore.cpp
View file @
f1ef1c30
...
...
@@ -20,7 +20,7 @@ class DataStore::Impl {
sdskv_client_t
m_sdskv_client
;
bake_client_t
m_bake_client
;
std
::
vector
<
sdskv_provider_handle_t
>
m_sdskv_ph
;
std
::
vector
<
sdskv_database_id_t
>
m_sdskv_db
;
// XXX to fill
std
::
vector
<
sdskv_database_id_t
>
m_sdskv_db
;
struct
ch_placement_instance
*
m_chi_sdskv
;
std
::
vector
<
bake_provider_handle_t
>
m_bake_ph
;
struct
ch_placement_instance
*
m_chi_bake
;
...
...
@@ -95,6 +95,16 @@ class DataStore::Impl {
}
}
}
// loop over sdskv providers and get the database id
for
(
auto
ph
:
m_sdskv_ph
)
{
sdskv_database_id_t
db_id
;
ret
=
sdskv_open
(
ph
,
"hepnosdb"
,
&
db_id
);
if
(
ret
!=
SDSKV_SUCCESS
)
{
cleanup
();
throw
Exception
(
"sdskv_open failed to open database"
);
}
m_sdskv_db
.
push_back
(
db_id
);
}
// initialize ch-placement for the SDSKV providers
m_chi_sdskv
=
ch_placement_initialize
(
"hash_lookup3"
,
m_sdskv_ph
.
size
(),
4
,
0
);
// get list of bake provider handles
...
...
@@ -147,8 +157,10 @@ class DataStore::Impl {
}
sdskv_client_finalize
(
m_sdskv_client
);
bake_client_finalize
(
m_bake_client
);
ch_placement_finalize
(
m_chi_sdskv
);
ch_placement_finalize
(
m_chi_bake
);
if
(
m_chi_sdskv
)
ch_placement_finalize
(
m_chi_sdskv
);
if
(
m_chi_bake
)
ch_placement_finalize
(
m_chi_bake
);
if
(
m_mid
)
margo_finalize
(
m_mid
);
}
...
...
test/example.cpp
View file @
f1ef1c30
#include <iostream>
#include <hepnos/DataStore.hpp>
#include <hepnos/DataSet.hpp>
using
namespace
hepnos
;
int
main
(
int
argc
,
char
**
argv
)
{
DataStore
ds
(
argv
[
1
]);
DataStore
datastore
(
argv
[
1
]);
DataSet
dataset
=
datastore
.
createDataSet
(
"myproject"
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment