Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
0f441888
Commit
0f441888
authored
Sep 24, 2020
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RoleStage] Split upload of similarity results due to size
parent
bc4462e8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
repository.py
...ub/role-stage-discovery-microservice/app/db/repository.py
+6
-0
dataOutput.py
...microservice/app/processing/similarityFiles/dataOutput.py
+4
-2
similarityMain.py
...oservice/app/processing/similarityFiles/similarityMain.py
+1
-2
repository.py
...n/trace-retrieval-microservice/app/database/repository.py
+3
-3
No files found.
src/data-hub/role-stage-discovery-microservice/app/db/repository.py
View file @
0f441888
...
...
@@ -104,6 +104,9 @@ class Repository(MongoRepositoryBase):
#endregion
#region clusterConnected
def
add_connected_cluster
(
self
,
clusterDict
):
super
()
.
insert_entry
(
self
.
_connected_clusters_collection
,
clusterDict
)
def
add_connected_clusters
(
self
,
clusterDictArray
):
''' Add Connected Clusters Data to DB '''
result
=
super
()
.
insert_many
(
self
.
_connected_clusters_collection
,
clusterDictArray
)
...
...
@@ -126,6 +129,9 @@ class Repository(MongoRepositoryBase):
#endregion
#region similarity
def
add_single_similarity
(
self
,
input_
):
super
()
.
insert_entry
(
self
.
_similarity_collection
,
input_
)
def
add_similarity
(
self
,
inputDict
):
''' Add Similarity Data to DB '''
#checkIfConnClustDictIsSerializable(outputJSON)
...
...
src/data-hub/role-stage-discovery-microservice/app/processing/similarityFiles/dataOutput.py
View file @
0f441888
...
...
@@ -126,7 +126,8 @@ def add_conn_clusters(inputDict,runId):
'''
outputJSON
=
convertLayerDictToJSON
(
inputDict
,
runId
)
repo
.
add_connected_clusters
(
outputJSON
)
for
element
in
outputJSON
:
repo
.
add_connected_cluster
(
element
)
def
add_similarity
(
inputDict
,
runId
):
''' Stores cluster_similarity in the database.
...
...
@@ -138,4 +139,5 @@ def add_similarity(inputDict,runId):
'''
outputJSON
=
convertSimilarityDictToJSON
(
inputDict
,
runId
)
repo
.
add_similarity
(
outputJSON
)
\ No newline at end of file
for
element
in
outputJSON
:
repo
.
add_single_similarity
(
element
)
\ No newline at end of file
src/data-hub/role-stage-discovery-microservice/app/processing/similarityFiles/similarityMain.py
View file @
0f441888
...
...
@@ -37,6 +37,7 @@ from processing.similarityFiles.calculateSimilarity import *
from
processing.similarityFiles.miscFunctions
import
*
from
processing.similarityFiles.dataOutput
import
*
outputToFileFLAG
=
True
def
main
(
layerNameList
:
List
[
str
]
=
[
"Price_Layer"
,
"FinishedTime_Layer"
,
"Destination_Layer"
]):
'''
...
...
@@ -48,8 +49,6 @@ def main(layerNameList:List[str] = ["Price_Layer","FinishedTime_Layer","Destinat
'''
print
(
"Entered Similarity Main"
)
outputToFileFLAG
=
False
timelist
=
[]
timelist
.
append
(
currentTime
())
#starting time
...
...
src/transaction-hub-in/trace-retrieval-microservice/app/database/repository.py
View file @
0f441888
...
...
@@ -12,9 +12,9 @@ class Repository(MongoRepositoryBase):
'''This is a repository for MongoDb.'''
def
__init__
(
self
):
super
()
.
__init__
(
netconst
.
BUSINESS_LOGIC
_DB_HOSTNAME
,
netconst
.
BUSINESS_LOGIC
_DB_PORT
,
'
rest-gateway-d
b'
)
super
()
.
__init__
(
netconst
.
TRACE_RETRIEVAL
_DB_HOSTNAME
,
netconst
.
TRACE_RETRIEVAL
_DB_PORT
,
'
traceRetrievalD
b'
)
self
.
_transaction_collection
=
'transactions'
self
.
_failed_transaction_collection
=
'transactions_failed'
...
...
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