Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
32f34a36
Commit
32f34a36
authored
13 years ago
by
buczekp
Browse files
Options
Downloads
Patches
Plain Diff
[LMS-2172] simple path info db based abstraction implemented
SVN: 20983
parent
6aaefb1b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java
+15
-17
15 additions, 17 deletions
...emsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java
with
15 additions
and
17 deletions
datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java
+
15
−
17
View file @
32f34a36
...
...
@@ -25,7 +25,7 @@ import net.lemnik.eodsql.QueryTool;
import
org.apache.log4j.Logger
;
import
ch.rinn.restrictions.Private
;
import
ch.systemsx.cisd.common.io.HierarchicalContentFactory
;
import
ch.systemsx.cisd.common.io.
DefaultFileBased
HierarchicalContentFactory
;
import
ch.systemsx.cisd.common.io.IHierarchicalContentFactory
;
import
ch.systemsx.cisd.common.logging.LogCategory
;
import
ch.systemsx.cisd.common.logging.LogFactory
;
...
...
@@ -45,36 +45,36 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.SimpleDataSetInformationDTO;
/**
* Maintenance and post registration task which feeds pathinfo database with all data set paths.
*
*
* @author Franz-Josef Elmer
*/
public
class
PathInfoDatabaseFeedingTask
implements
IMaintenanceTask
,
IPostRegistrationTask
{
private
static
final
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
PathInfoDatabaseFeedingTask
.
class
);
private
static
IPathsInfoDAO
createDAO
()
{
return
QueryTool
.
getQuery
(
PathInfoDataSourceProvider
.
getDataSource
(),
IPathsInfoDAO
.
class
);
}
private
static
IDataSetDirectoryProvider
getDirectoryProvider
()
{
return
ServiceProvider
.
getDataStoreService
().
getDataSetDirectoryProvider
();
}
private
static
HierarchicalContentFactory
createContentFactory
()
private
static
I
HierarchicalContentFactory
createContentFactory
()
{
return
new
HierarchicalContentFactory
();
return
new
DefaultFileBased
HierarchicalContentFactory
();
}
private
IEncapsulatedOpenBISService
service
;
private
IDataSetDirectoryProvider
directoryProvider
;
private
IPathsInfoDAO
dao
;
private
IHierarchicalContentFactory
hierarchicalContentFactory
;
private
IHierarchicalContentFactory
hierarchicalContentFactory
;
// filesystem based
public
PathInfoDatabaseFeedingTask
()
{
...
...
@@ -100,7 +100,6 @@ public class PathInfoDatabaseFeedingTask implements IMaintenanceTask, IPostRegis
{
return
false
;
}
public
void
setUp
(
String
pluginName
,
Properties
properties
)
{
...
...
@@ -140,7 +139,7 @@ public class PathInfoDatabaseFeedingTask implements IMaintenanceTask, IPostRegis
}
};
}
private
void
feedPathInfoDatabase
(
IDatasetLocation
dataSet
)
{
IShareIdManager
shareIdManager
=
directoryProvider
.
getShareIdManager
();
...
...
@@ -149,8 +148,8 @@ public class PathInfoDatabaseFeedingTask implements IMaintenanceTask, IPostRegis
File
dataSetRoot
=
directoryProvider
.
getDataSetDirectory
(
dataSet
);
if
(
dataSetRoot
.
exists
()
==
false
)
{
operationLog
.
error
(
"Root directory of data set "
+
dataSetCode
+
" does not exists: "
+
dataSetRoot
);
operationLog
.
error
(
"Root directory of data set "
+
dataSetCode
+
" does not exists: "
+
dataSetRoot
);
shareIdManager
.
releaseLocks
();
return
;
}
...
...
@@ -178,9 +177,8 @@ public class PathInfoDatabaseFeedingTask implements IMaintenanceTask, IPostRegis
private
void
handleException
(
Exception
ex
,
String
dataSet
)
{
operationLog
.
error
(
"Couldn't feed database with path infos of data set "
+
dataSet
,
ex
);
operationLog
.
error
(
"Couldn't feed database with path infos of data set "
+
dataSet
,
ex
);
dao
.
rollback
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment