orientechnologies / spark-orientdb

Apache Spark datasource for OrientDB
Other
19 stars 11 forks source link

Publish artifacts to Maven Central #29

Open koiralo opened 3 years ago

koiralo commented 3 years ago

@lvca Should we publish the jars to maven central, I can take a look on this one to publish to maven central.

lvca commented 3 years ago

@koiralo I would be very happy if you can do that ;-)

koiralo commented 3 years ago

Ok I am on it, I get some errors while running some examples, trying to create vertices and edges from dataframe, even tho I used the admin account, any Idea? I am running examples from the readme page OrientDB: 3.2.0 Spark: 3.1.1 and current spark-orientdb Connector

Exception in thread "main" java.lang.RuntimeException: An exception was thrown: Job aborted due to stage failure: Task 0 in stage 0.0 failed 1 times, most recent failure: Lost task 0.0 in stage 0.0 (TID 0, shankars-mbp, executor driver): com.orientechnologies.orient.core.exception.OSecurityException: Cannot delete record #29:0: the resource has restricted access due to security policies
    DB name="cn"
    DB name="cn"
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleException(OChannelBinaryAsynchClient.java:357)
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:305)
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:327)
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:211)
    at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:169)
    at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2249)
    at com.orientechnologies.orient.client.remote.OStorageRemote.lambda$networkOperationRetryTimeout$2(OStorageRemote.java:401)
    at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:463)
    at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationRetryTimeout(OStorageRemote.java:381)
    at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationNoRetry(OStorageRemote.java:416)
    at com.orientechnologies.orient.client.remote.OStorageRemote.commit(OStorageRemote.java:1320)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.internalCommit(ODatabaseDocumentAbstract.java:2466)
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:602)
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:106)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.commit(ODatabaseDocumentAbstract.java:1984)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.commit(ODatabaseDocumentAbstract.java:1954)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:741)
    at com.orientechnologies.orient.core.record.impl.OVertexDocument.moveTo(OVertexDocument.java:327)
    at com.orientechnologies.orient.core.record.impl.OVertexDelegate.moveTo(OVertexDelegate.java:744)
    at com.tinkerpop.blueprints.impls.orient.OrientVertex.moveTo(OrientVertex.java:614)
    at com.tinkerpop.blueprints.impls.orient.OrientVertex.moveToClass(OrientVertex.java:589)
    at org.apache.spark.orientdb.graphs.OrientDBVertexWriter.$anonfun$doOrientDBVertexLoad$1(OrientDBWriter.scala:111)
    at org.apache.spark.orientdb.graphs.OrientDBVertexWriter.$anonfun$doOrientDBVertexLoad$1$adapted(OrientDBWriter.scala:79)
    at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$2(RDD.scala:994)
    at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$2$adapted(RDD.scala:994)
    at org.apache.spark.SparkContext.$anonfun$runJob$5(SparkContext.scala:2133)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
    at org.apache.spark.scheduler.Task.run(Task.scala:127)
    at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:444)
    at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1377)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:447)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
    Suppressed: com.orientechnologies.orient.core.exception.OSecurityException: Cannot delete record #29:0: the resource has restricted access due to security policies
    DB name="cn"
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.beforeDeleteOperations(ODatabaseDocumentEmbedded.java:1145)
        at com.orientechnologies.orient.server.tx.OTransactionOptimisticServer.addRecord(OTransactionOptimisticServer.java:361)
        at com.orientechnologies.orient.server.tx.OTransactionOptimisticServer.begin(OTransactionOptimisticServer.java:190)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.rawBegin(ODatabaseDocumentAbstract.java:982)
        at com.orientechnologies.orient.server.OConnectionBinaryExecutor.executeCommit38(OConnectionBinaryExecutor.java:1547)
        at com.orientechnologies.orient.client.remote.message.OCommit38Request.execute(OCommit38Request.java:139)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:355)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:239)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:67)

Driver stacktrace:
    at org.apache.spark.orientdb.graphs.OrientDBVertexWriter.doOrientDBVertexLoad(OrientDBWriter.scala:117)
    at org.apache.spark.orientdb.graphs.OrientDBVertexWriter.saveToOrientDB(OrientDBWriter.scala:127)
    at org.apache.spark.orientdb.graphs.DefaultSource.createRelation(DefaultSource.scala:97)
    at org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:46)
    at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
    at org`