简体   繁体   中英

OStorageException occurs while creating a vertex using the etl process in Orientdb

I am relatively new to OrientDB. I want to load a couple of CSV files to OrientDb. I loaded one of the file as a vertex and it worked fine, similarly, when I try to load another file the below exception is thrown

com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage '../databases/AABbd' with mode=rw

Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot open storage it is acquired by other process

The first file (member-gm.csv) contained values as shown below

MEMBERID,ENROLLBEGINDATE,ENROLLENDDATE,Dental,Drug,MHInpt,MHDN,MHAMB,CDInpt,CDDN,CDAMB,Hospice,Payer,PEFlag,Ind
95000,20141118,20160328,Y,Y,Y,Y,Y,Y,Y,Y,N,MCS,N,A
95001,20150225,20181231,Y,N,Y,Y,Y,Y,Y,Y,N,POS,N,A
95002,20150607,20160620,Y,Y,Y,Y,Y,Y,Y,Y,N,MLI,N,

The Json(Members.json) file which was created for loading the above file is

{
  "source": { "file": { "path": "/G:/AAB/member-gm.csv" } },  
  "extractor": { "csv": { "columns":    ["MEMBERID","Gender","DOB","LName","FName","MMidName","SubID","Add1","Add2","City","State","MZip","MPhone","PFirstName","PMidName","PLastName","Race","Ethn","RaceDS","EthnDS","SpokenLang","SpokenLangSource","WrittenLang","WrittenLangSource","OtherLang","OtherSource"],
       "columnsOnFirstLine": true } },
"transformers": [
{ "vertex": { "class": "Member" } }
],
"loader": {
"orientdb": {
   "dbURL": "plocal:../databases/AABbd",
   "dbType": "graph",
   "classes": [
     {"name": "Member", "extends": "V"}
    ]
  }
 }
} 

I executed the json file with the command G:\\orientdb-community-importers-2.2.29\\bin> oetl.bat /AAB/Members.json Database AABdb and Vertex Member was created.

The 2nd vertex which I want to create is the payer vertex and the related csv(Payer_category.csv) is as below

ID,Payer_Line,Payer_Name,Input_Payer,Output_payer
1,Medicaid,Medicaid,MMP,MCD
2,Medicare,Medicaid Dual Eligible HMO,MDE,MCR
3,Medicaid,Medicaid Dual Eligible HMO,MDE,MCD

The Related Payer.json file contains

{
  "source": { "file": { "path": "/G:/AAB/Payer_category.csv" } },  
  "extractor": { "csv": { "columns": ["ID","Payer_Line","Payer_Name","Input_Payer","Output_payer"],
                            "columnsOnFirstLine": true } },
  "transformers": [
    { "vertex": { "class": "Payer" } }
  ],
  "loader": {
    "orientdb": {
       "dbURL": "plocal:../databases/AABbd",
       "dbType": "graph",
       "classes": [
         {"name": "Payer", "extends": "V"}
       ]
    }
  }
}

When I execute the G:\\orientdb-community-importers-2.2.29\\bin> oetl.bat /AAB/Payer.json The below error is thrown

G:\orientdb-community-importers-2.2.29\bin>oetl.bat /AAB/Payer.json
OrientDB etl v.2.2.29 (build 9914189f972103907c24377a1567897e68642920) 
https://www.orientdb.com
[file] INFO Load from file /G:/AAB/Payer_category.csv
[csv] INFO column types: {Payer_Name=ANY, Payer_Line=ANY, ID=ANY, Input_Payer=AN
Y, Output_payer=ANY}
[orientdb] INFO Opening database 'plocal:../databases/AABbd'...
$ANSI{green {db=AABbd}} Exception `3023DF74` in storage `AABbd`
com.orientechnologies.orient.core.exception.OStorageException: Cannot open local
 storage '../databases/AABbd' with mode=rw
    DB name="AABbd"
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginat
edStorage.open(OAbstractPaginatedStorage.java:304)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.ope
n(ODatabaseDocumentTx.java:259)
    at com.orientechnologies.orient.etl.loader.OOrientDBLoader.configureDocu
mentDB(OOrientDBLoader.java:400)
    at com.orientechnologies.orient.etl.loader.OOrientDBLoader.configure(OOr
ientDBLoader.java:343)
    at com.orientechnologies.orient.etl.OETLProcessor.configureComponent(OET
LProcessor.java:470)
    at com.orientechnologies.orient.etl.OETLProcessor.configureLoader(OETLPr
ocessor.java:291)
    at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.ja
va:223)
    at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.ja
va:187)
    at com.orientechnologies.orient.etl.OETLProcessor.parseConfigAndParamete
rs(OETLProcessor.java:155)
    at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.jav
a:119)
Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot
 open storage it is acquired by other process
    DB name="AABbd"
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OPagin
atedStorageDirtyFlag.lockFile(OPaginatedStorageDirtyFlag.java:96)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OPagin
atedStorageDirtyFlag.open(OPaginatedStorageDirtyFlag.java:129)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocal
PaginatedStorage.preOpenSteps(OLocalPaginatedStorage.java:424)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginat
edStorage.open(OAbstractPaginatedStorage.java:258)
    ... 9 more
Exception in thread "main" com.orientechnologies.orient.core.exception.OConfigur
ationException: Error on creating ETL processor
    at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.ja
va:239)
    at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.ja
va:187)
    at com.orientechnologies.orient.etl.OETLProcessor.parseConfigAndParamete
rs(OETLProcessor.java:155)
    at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.jav
a:119)
Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot
 open local storage '../databases/AABbd' with mode=rw
    DB name="AABbd"
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginat
edStorage.open(OAbstractPaginatedStorage.java:304)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.ope
n(ODatabaseDocumentTx.java:259)
    at com.orientechnologies.orient.etl.loader.OOrientDBLoader.configureDocu
mentDB(OOrientDBLoader.java:400)
    at com.orientechnologies.orient.etl.loader.OOrientDBLoader.configure(OOr
ientDBLoader.java:343)
    at com.orientechnologies.orient.etl.OETLProcessor.configureComponent(OET
LProcessor.java:470)
    at com.orientechnologies.orient.etl.OETLProcessor.configureLoader(OETLPr
ocessor.java:291)
    at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.ja
va:223)
    ... 3 more
Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot
 open storage it is acquired by other process
    DB name="AABbd"
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OPagin
atedStorageDirtyFlag.lockFile(OPaginatedStorageDirtyFlag.java:96)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OPagin
atedStorageDirtyFlag.open(OPaginatedStorageDirtyFlag.java:129)
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocal
PaginatedStorage.preOpenSteps(OLocalPaginatedStorage.java:424)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginat
edStorage.open(OAbstractPaginatedStorage.java:258)
    ... 9 more
  • All this is directly done on the server.
  • I tried using the dbUsername and dbPassword properties as well, the result was the same

---------Edit----------------------------

When I try to create a new DB with second json file(Payer.json), a new db with the vertex Payer is created, its just that in an already existing db a new vertex is not getting created.


Any help will be much appreciated. Thanks

is it normal that the files have different name member-gm.csv member-en.csv ?? I try the case and it works fine, by the way, this error:

com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage '../databases/AABbd' with mode=rw

Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot open storage it is acquired by other process 

it might be caused the server is up and running and you are doing the import with plocal or your server is down but you're connected by console....

hope it helps

Regards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM