简体   繁体   English

使用Orientdb中的etl进程创建顶点时发生OStorageException

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

I am relatively new to OrientDB. 我对OrientDB比较陌生。 I want to load a couple of CSV files to OrientDb. 我想将几个CSV文件加载到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 com.orientechnologies.orient.core.exception.OStorageException:无法使用mode = rw打开本地存储'../databases/AABbd'

Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot open storage it is acquired by other process 引起原因:com.orientechnologies.orient.core.exception.OStorageException:无法打开由其他进程获取的存储

The first file (member-gm.csv) contained values as shown below 第一个文件(member-gm.csv)包含如下所示的值

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 为加载以上文件而创建的Json(Members.json)文件为

{
  "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. 我使用命令G:\\ orientdb-community-importers-2.2.29 \\ bin> oetl.bat /AAB/Members.json执行了json文件, 并创建了Vertex Member。

The 2nd vertex which I want to create is the payer vertex and the related csv(Payer_category.csv) is as below 我要创建的第二个顶点是付款人顶点,相关的csv(Payer_category.csv)如下

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 相关的Payer.json文件包含

{
  "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时,抛出以下错误

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 我也尝试使用dbUsername和dbPassword属性,结果是相同的

---------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. 当我尝试使用第二个json文件(Payer.json)创建一个新的数据库时,将创建一个具有顶点付款人的新数据库,只是在现有数据库中没有创建一个新的顶点。


Any help will be much appreciated. 任何帮助都感激不尽。 Thanks 谢谢

is it normal that the files have different name member-gm.csv member-en.csv ?? 这些文件使用不同的名称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.... 这可能是由于服务器已启动并正在运行,并且您正在使用plocal进行导入或服务器已关闭,但已通过控制台连接。...

hope it helps 希望能帮助到你

Regards 问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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