OrientDB ETL加载本地连接

时间:2016-02-04 18:26:54

标签: orientdb

我正在尝试使用带有JDBC驱动程序的oetl.sh为源数据(Oracle)加载数据。它似乎与远程连接一起使用,但希望通过本地获得更好的性能。知道什么似乎是个问题。

BEGIN ETL PROCESSOR
Started parallel execution with 8 threads
Error in Pipeline execution: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-1,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6d33fda5
Error in Pipeline execution: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-7,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@584dbc8c
Exception in thread "OrientDB ETL pipeline-1" Exception in thread "OrientDB ETL pipeline-7" Error in Pipeline execution: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-0,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6b6afd0
Exception in thread "OrientDB ETL pipeline-0" com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:149)
	at com.orientechnologies.orient.etl.OETLProcessor$2.run(OETLProcessor.java:332)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-1,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6d33fda5
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3243)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getTransaction(ODatabaseDocumentTx.java:1547)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
	at com.orientechnologies.orient.etl.transformer.OAbstractLookupTransformer.lookup(OAbstractLookupTransformer.java:87)
	at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:122)
	at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:115)
	... 2 more
com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:149)
	at com.orientechnologies.orient.etl.OETLProcessor$2.run(OETLProcessor.java:332)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-0,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6b6afd0
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3243)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getTransaction(ODatabaseDocumentTx.java:1547)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
	at com.orientechnologies.orient.etl.transformer.OAbstractLookupTransformer.lookup(OAbstractLookupTransformer.java:87)
	at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:122)
	at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:115)
	... 2 more
com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:149)
	at com.orientechnologies.orient.etl.OETLProcessor$2.run(OETLProcessor.java:332)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-7,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@584dbc8c
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3243)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getTransaction(ODatabaseDocumentTx.java:1547)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
	at com.orientechnologies.orient.etl.transformer.OAbstractLookupTransformer.lookup(OAbstractLookupTransformer.java:87)
	at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:122)
	at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:115)
	... 2 more
Error in Pipeline execution: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-2,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@5a86e53b
Exception in thread "OrientDB ETL pipeline-2" com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:149)
	at com.orientechnologies.orient.etl.OETLProcessor$2.run(OETLProcessor.java:332)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-2,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@5a86e53b
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3243)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getTransaction(ODatabaseDocumentTx.java:1547)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
	at com.orientechnologies.orient.etl.transformer.OAbstractLookupTransformer.lookup(OAbstractLookupTransformer.java:87)
	at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:122)
	at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:115)
	... 2 more
Error in Pipeline execution: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-4,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@20d373c8
Exception in thread "OrientDB ETL pipeline-4" com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:149)
	at com.orientechnologies.orient.etl.OETLProcessor$2.run(OETLProcessor.java:332)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-4,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@20d373c8
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3243)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getTransaction(ODatabaseDocumentTx.java:1547)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
	at com.orientechnologies.orient.etl.transformer.OAbstractLookupTransformer.lookup(OAbstractLookupTransformer.java:87)
	at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:122)
	at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:115)
	... 2 more
Error in Pipeline execution: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-5,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@20d373c8
Exception in thread "OrientDB ETL pipeline-5" com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:149)
	at com.orientechnologies.orient.etl.OETLProcessor$2.run(OETLProcessor.java:332)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-5,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@20d373c8
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3243)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getTransaction(ODatabaseDocumentTx.java:1547)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
	at com.orientechnologies.orient.etl.transformer.OAbstractLookupTransformer.lookup(OAbstractLookupTransformer.java:87)
	at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:122)
	at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:115)
	... 2 more
Error in Pipeline execution: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-3,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@20d373c8
Exception in thread "OrientDB ETL pipeline-3" com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:149)
	at com.orientechnologies.orient.etl.OETLProcessor$2.run(OETLProcessor.java:332)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-3,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@20d373c8
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3243)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getTransaction(ODatabaseDocumentTx.java:1547)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
	at com.orientechnologies.orient.etl.transformer.OAbstractLookupTransformer.lookup(OAbstractLookupTransformer.java:87)
	at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:122)
	at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:115)
	... 2 more
Error in Pipeline execution: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-6,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@20d373c8
Exception in thread "OrientDB ETL pipeline-6" com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:149)
	at com.orientechnologies.orient.etl.OETLProcessor$2.run(OETLProcessor.java:332)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Current database instance (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@6c640ef) is not active on current thread (Thread[OrientDB ETL pipeline-6,5,main]). Current active database is: com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@20d373c8
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3243)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getTransaction(ODatabaseDocumentTx.java:1547)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
	at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
	at com.orientechnologies.orient.etl.transformer.OAbstractLookupTransformer.lookup(OAbstractLookupTransformer.java:87)
	at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:122)
	at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
	at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:115)
	... 2 more

//alert:
{
  "config": {
    //  "log": "debug",
    "parallel": true
  },
  "extractor" : {
    "jdbc": { "driver": "oracle.jdbc.driver.OracleDriver",
              "url": "jdbc:oracle:thin:@hostname:port/dbname",
              "userName": "schema1",
              "userPassword": "password",
              "query": "select * from MC_ALERT$" }
  },
  "transformers" : [
   { "vertex": { "class":"MC_ALERT"} }
  ],
"loader": {
    "orientdb": {
      //"dbURL": "remote:localhost/Users/dbadmin/workspace/orientdbEnprise2.1.8/databases/messaging",
      "dbURL": "plocal:/Users/dbadmin/workspace/orientdbEnprise2.1.8/databases/messaging",         
      "dbType": "graph",
      "dbUser": "admin",
      "dbPassword": "admin",
      "dbAutoCreate": true,
      "batchCommit": 1000,    
      "indexes": [
        {
          "class": "MC_ALERT",
          "fields": [ "ALERT_UUID:string" ],    
          "type": "UNIQUE"
        }
      ]
    }
  }
}



//userRead:

{
  "config": {
    "parallel": true
  },
  "extractor" : {
   "jdbc": { "driver": "oracle.jdbc.driver.OracleDriver",
              "url": "jdbc:oracle:thin:@hostname:port/dbname",
              "userName": "schema1",
              "userPassword": "password",
              "query": "select a.* from MC_ALERT_USER_READ$ a, MC_ALERT$ b where a.alert_id = b.alert_uuid" }
  },
  "transformers" : [
   { "vertex": { "class":"MC_ALERT_USER_READ"} },
  { "edge": { "class": "has_alert_read",
                "joinFieldName": "ALERT_ID",
                "lookup": "mc_alert.ALERT_UUID",
                 "unresolvedLinkAction":"CREATE",
                "direction": "in"
            },
            "skipDuplicates": true
    }       
  ],
"loader": {
    "orientdb": {
      //"dbURL": "remote:localhost/Users/dbadmin/workspace/orientdbEnprise2.1.8/databases/messaging",
       "dbURL": "plocal:/Users/dbadmin/workspace/orientdbEnprise2.1.8/databases/messaging",         
      "dbType": "graph",
      "dbUser": "admin",
      "dbPassword": "admin",
      "dbAutoCreate": true,
      "batchCommit": 1000,    
      "classes": [
        {"name": "MC_ALERT","extends": "V"},
        {"name": "MC_ALERT_USER_READ", "extends": "V"},
        {"name": "HAS_ALERT_READ", "extends": "E"}
      ],
      "indexes": [
        {
          "class": "MC_ALERT_USER_READ",
          "fields": [ "CLIENT_OID:string","USER_OID:string","ALERT_ID:string"], 
          //"fields": [ "alert_id:string"],    
          "type": "UNIQUE"
        }
      ]
    }
  }
}

0 个答案:

没有答案