Hi, I am on it. Will fix it till Monday.
On Thu, May 22, 2014 at 9:51 PM, Alan Miller <[email protected]> wrote: > I'm trying to use different classes to partition my graph. e.g.: > Say I have a FRUITBOWL graph with Apples, Bananas, classes that extend V. > > That's fine, I can bulk load an initial set of Apples or Bananas but my > issue is this. > > My ETL process needs to load new Apples every day. Since the process takes > several hours I want to load the new apples into my production graph as > NewApples first, > then once the ETL process is finished, delete the Apples and rename > NewApples to Apples. > > Before trying to implement this in Java, I tried to simulate the process > from the console. > > Loading initial data works > CREATE DATABASE remote:localhost/FRUIT admin admin plocal > CREATE CLASS Apples EXTENDS V; > INSERT INTO apples (name,version) VALUES ("apple",0) > orientdb {FRUIT}> select * from Apples; > ----+-----+-----+------- > # |@RID |name |version > ----+-----+-----+------- > 0 |#11:0|apple|0 > ----+-----+-----+------- > > The first iteration also works without errors (e.g.: version=1) > CONNECT remote:localhost/FRUIT admin admin > CREATE CLASS NewApples extends Apples > INSERT INTO newapples (name,version) VALUES("apple",1) > ALTER CLASS Apples removecluster apples > ALTER CLASS NewApples removecluster newapples > DROP CLASS NewApples > ALTER CLASS Apples addcluster newapples > DROP CLUSTER apples > ALTER CLUSTER newapples name apples > > orientdb {FRUIT}> select * from Apples > ----+-----+-----+------- > # |@RID |name |version > ----+-----+-----+------- > 0 |#12:0|apple|1 > ----+-----+-----+------- > > On the second iteration this is what happens: > CONNECT remote:localhost/FRUIT admin admin > CREATE CLASS NewApples extends Apples > INSERT INTO newapples (name,version) VALUES("apple",2) > ALTER CLASS Apples removecluster apples > ALTER CLASS NewApples removecluster newapples > DROP CLASS NewApples > ALTER CLASS Apples addcluster newapples > > DROP CLUSTER apples > ALTER CLUSTER newapples name apples > orientdb {FRUIT}> info class Apples > > Class................: Apples > Super class..........: V > Default cluster......: apples (id=11) > Supported cluster ids: [11] > orientdb {FRUIT}> select * from Apples > > Error: > com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: > Exception during response processing. > Error: > com.orientechnologies.orient.core.exception.OCommandExecutionException: > Error on execution of command: sql.select * from Apples > Error: java.lang.NullPointerException > > In trying this numerous times, I noticed that after running the > DROP CLUSTER apples > command that both the newapples and apples clusters are getting deleted. > so shouldn't the > ALTER CLASS Apples addcluster newapples > command be complaining that the newapples cluster doesnt exist? > > > Alan > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Best regards, Andrey Lomakin. Orient Technologies the Company behind OrientDB -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
