Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Levin Zimmermann
wendelin
Commits
24511e08
Commit
24511e08
authored
Jul 16, 2020
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin_data_lake_ingestion: use linked data streams for split ingestions
- test updated
parent
7beae64a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
3 deletions
+31
-3
bt5/erp5_wendelin_data_lake_ingestion/SkinTemplateItem/portal_skins/erp5_wendelin_data_lake/ERP5Site_stopIngestionList.py
...ins/erp5_wendelin_data_lake/ERP5Site_stopIngestionList.py
+10
-0
bt5/erp5_wendelin_data_lake_ingestion/TestTemplateItem/portal_components/test.erp5.testDataLakeIngestion.py
...Item/portal_components/test.erp5.testDataLakeIngestion.py
+19
-1
bt5/erp5_wendelin_data_lake_ingestion/TestTemplateItem/portal_components/test.erp5.testDataLakeIngestion.xml
...tem/portal_components/test.erp5.testDataLakeIngestion.xml
+2
-2
No files found.
bt5/erp5_wendelin_data_lake_ingestion/SkinTemplateItem/portal_skins/erp5_wendelin_data_lake/ERP5Site_stopIngestionList.py
View file @
24511e08
...
@@ -93,6 +93,16 @@ for data_ingestion in portal_catalog(portal_type = "Data Ingestion",
...
@@ -93,6 +93,16 @@ for data_ingestion in portal_catalog(portal_type = "Data Ingestion",
ingestion
.
stop
()
ingestion
.
stop
()
else
:
else
:
ingestion
.
deliver
()
ingestion
.
deliver
()
#link split datastreams
related_split_streams
=
portal_catalog
(
portal_type
=
"Data Stream"
,
reference
=
data_ingestion
.
getReference
(),
sort_on
=
[(
'creation_date'
,
'ascending'
)])
predecessor
=
None
for
stream
in
related_split_streams
:
if
predecessor
:
predecessor
.
setSuccessorValue
(
stream
)
stream
.
setPredecessorValue
(
predecessor
)
predecessor
=
stream
except
Exception
as
e
:
except
Exception
as
e
:
context
.
log
(
"ERROR handling split data streams for ingestion: %s - reference: %s."
%
(
data_ingestion
.
getId
(),
data_ingestion
.
getReference
()))
context
.
log
(
"ERROR handling split data streams for ingestion: %s - reference: %s."
%
(
data_ingestion
.
getId
(),
data_ingestion
.
getReference
()))
context
.
log
(
e
)
context
.
log
(
e
)
...
...
bt5/erp5_wendelin_data_lake_ingestion/TestTemplateItem/portal_components/test.erp5.testDataLakeIngestion.py
View file @
24511e08
...
@@ -75,7 +75,8 @@ class TestDataIngestion(SecurityTestCase):
...
@@ -75,7 +75,8 @@ class TestDataIngestion(SecurityTestCase):
def
getDataStreamChunkList
(
self
,
reference
):
def
getDataStreamChunkList
(
self
,
reference
):
data_stream_list
=
self
.
portal
.
portal_catalog
(
data_stream_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Data Stream'
,
portal_type
=
'Data Stream'
,
reference
=
reference
)
reference
=
reference
,
sort_on
=
[(
'creation_date'
,
'ascending'
)])
return
data_stream_list
return
data_stream_list
def
ingestRequest
(
self
,
reference
,
eof
,
data_chunk
,
ingestion_policy
):
def
ingestRequest
(
self
,
reference
,
eof
,
data_chunk
,
ingestion_policy
):
...
@@ -189,6 +190,23 @@ class TestDataIngestion(SecurityTestCase):
...
@@ -189,6 +190,23 @@ class TestDataIngestion(SecurityTestCase):
#all data streams are validated
#all data streams are validated
self
.
assertSameSet
([
'validated'
for
x
in
data_stream_list
],
self
.
assertSameSet
([
'validated'
for
x
in
data_stream_list
],
[
x
.
getValidationState
()
for
x
in
data_stream_list
])
[
x
.
getValidationState
()
for
x
in
data_stream_list
])
#data streams are linked
data_stream_1
=
data_stream_list
[
0
].
getObject
()
data_stream_2
=
data_stream_list
[
1
].
getObject
()
data_stream_3
=
data_stream_list
[
2
].
getObject
()
data_stream_4
=
data_stream_list
[
3
].
getObject
()
# test successor
self
.
assertSameSet
(
data_stream_2
.
getRecursiveSuccessorValueList
(),
\
[
data_stream_3
,
data_stream_4
])
self
.
assertSameSet
(
data_stream_4
.
getRecursiveSuccessorValueList
(),
\
[])
# test predecessor
self
.
assertSameSet
(
data_stream_1
.
getRecursivePredecessorValueList
(),
\
[])
self
.
assertSameSet
(
data_stream_2
.
getRecursivePredecessorValueList
(),
\
[
data_stream_1
])
self
.
assertSameSet
(
data_stream_4
.
getRecursivePredecessorValueList
(),
\
[
data_stream_3
,
data_stream_2
,
data_stream_1
])
def
test_03_DefaultWendelinConfigurationExistency
(
self
):
def
test_03_DefaultWendelinConfigurationExistency
(
self
):
"""
"""
...
...
bt5/erp5_wendelin_data_lake_ingestion/TestTemplateItem/portal_components/test.erp5.testDataLakeIngestion.xml
View file @
24511e08
...
@@ -46,8 +46,8 @@
...
@@ -46,8 +46,8 @@
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
W:10
4
, 34: Unused variable \'i\' (unused-variable)
</string>
<string>
W:10
5
, 34: Unused variable \'i\' (unused-variable)
</string>
<string>
W:10
4
, 76: Unused variable \'j\' (unused-variable)
</string>
<string>
W:10
5
, 76: Unused variable \'j\' (unused-variable)
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
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