[jira] [Commented] (GORA-53) Add Gora-Cassandra tests

2012-07-12 Thread Lewis John McGibbney (JIRA)

[ 
https://issues.apache.org/jira/browse/GORA-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13412752#comment-13412752
 ] 

Lewis John McGibbney commented on GORA-53:
--

I get 1 failure and 52 errors. A number of complains in all honesty.
I'm firstly going to investigate the following one as it occurs on the first 
test in the suite and also consistently throughout the entire test suite. 

{code}
testNewInstance(org.apache.gora.cassandra.store.TestCassandraStore)  Time 
elapsed: 19.749 sec   ERROR!
me.prettyprint.hector.api.exceptions.HInvalidRequestException: 
InvalidRequestException(why:Cannot drop non existing keyspace 'Employee'.)
at 
me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:45)
at 
me.prettyprint.cassandra.service.AbstractCluster$5.execute(AbstractCluster.java:231)
at 
me.prettyprint.cassandra.service.AbstractCluster$5.execute(AbstractCluster.java:218)
at 
me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:103)
at 
me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:246)
at 
me.prettyprint.cassandra.service.AbstractCluster.dropKeyspace(AbstractCluster.java:235)
at 
me.prettyprint.cassandra.service.AbstractCluster.dropKeyspace(AbstractCluster.java:213)
at 
org.apache.gora.cassandra.store.CassandraClient.dropKeyspace(CassandraClient.java:128)
at 
org.apache.gora.cassandra.store.CassandraStore.deleteSchema(CassandraStore.java:118)
at org.apache.gora.GoraTestDriver.tearDown(GoraTestDriver.java:92)
at 
org.apache.gora.store.DataStoreTestBase.tearDown(DataStoreTestBase.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:36)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at 
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at 
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: InvalidRequestException(why:Cannot drop non existing keyspace 
'Employee'.)
at 
org.apache.cassandra.thrift.Cassandra$system_drop_keyspace_result.read(Cassandra.java:30808)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
at 
org.apache.cassandra.thrift.Cassandra$Client.recv_system_drop_keyspace(Cassandra.java:1314)
at 
org.apache.cassandra.thrift.Cassandra$Client.system_drop_keyspace(Cassandra.java:1301)
at 

[jira] [Comment Edited] (GORA-53) Add Gora-Cassandra tests

2012-07-12 Thread Kazuomi Kashii (JIRA)

[ 
https://issues.apache.org/jira/browse/GORA-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13412881#comment-13412881
 ] 

Kazuomi Kashii edited comment on GORA-53 at 7/12/12 3:56 PM:
-

It is because of  InvalidRequestException(why:Cannot drop non existing keyspace 
'Employee'.) 
at 
org.apache.gora.cassandra.store.CassandraClient.dropKeyspace(CassandraClient.java:128)
 

try {
  this.cluster.dropKeyspace(this.cassandraMapping.getKeyspaceName());
}
catch (Exception e) {
  LOG.info(e.toString());
}

would fix them (we may want better exception handling..), but we see another 
ones.

Tests run: 28, Failures: 0, Errors: 27, Skipped: 0, Time elapsed: 2.076 sec  
FAILURE!
testCreateSchema(org.apache.gora.cassandra.store.TestCassandraStore)  Time 
elapsed: 0.002 sec   ERROR!
java.lang.NullPointerException
at 
org.apache.gora.store.DataStoreTestUtil.testCreateEmployeeSchema(DataStoreTestUtil.java:102)
at 
org.apache.gora.store.DataStoreTestBase.testCreateSchema(DataStoreTestBase.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

It seems that dataset has not been set (or not passed) at the following method.

  public static void testCreateEmployeeSchema(DataStoreString, Employee 
dataStore)
  throws IOException {
dataStore.createSchema();

//should not throw exception
dataStore.createSchema();
  }

It is called by DataStoreTestBase:

  @Test
  public void testCreateSchema() throws Exception {
log.info(test method: testCreateSchema);
DataStoreTestUtil.testCreateEmployeeSchema(employeeStore);
assertSchemaExists(Employee);
  }

so employeeStore has not been set before that.


  was (Author: kazk):
It is because of  InvalidRequestException(why:Cannot drop non existing 
keyspace 'Employee'.) 
at 
org.apache.gora.cassandra.store.CassandraClient.dropKeyspace(CassandraClient.java:128)
 

try {
  this.cluster.dropKeyspace(this.cassandraMapping.getKeyspaceName());
}
catch (Exception e) {
  LOG.info(e.toString());
}

would fix them (we may want better exception handling..), but we see another 
ones.

Tests run: 28, Failures: 0, Errors: 27, Skipped: 0, Time elapsed: 2.076 sec  
FAILURE!
testCreateSchema(org.apache.gora.cassandra.store.TestCassandraStore)  Time 
elapsed: 0.002 sec   ERROR!
java.lang.NullPointerException
at 
org.apache.gora.store.DataStoreTestUtil.testCreateEmployeeSchema(DataStoreTestUtil.java:102)
at 
org.apache.gora.store.DataStoreTestBase.testCreateSchema(DataStoreTestBase.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

It seems that dataset is not set (or not passed) at the following.

  public static void testCreateEmployeeSchema(DataStoreString, Employee 
dataStore)
  throws IOException {
dataStore.createSchema();

//should not throw exception
dataStore.createSchema();
  }



  
 Add Gora-Cassandra tests
 

 Key: GORA-53
 URL: https://issues.apache.org/jira/browse/GORA-53
 Project: Apache Gora
  Issue Type: Improvement
  Components: storage-cassandra
Affects Versions: 0.1.1-incubating
Reporter: Lewis John McGibbney
Assignee: Lewis John McGibbney
Priority: Critical
 Fix For: 0.3

 Attachments: GORA-53-v2.patch, GORA-53.patch, GORA-54-v8.patch


 As per this thread [1], it is absolutely essential that we get some tests for 
 the Cassandra module. Therefore this task should act as a summary task to 
 manage all test which are hereby proposed.
 Realistically, this is going to take a good while, so I have marked it for 
 0.2 and 0.3-incubating releases.
 [1] http://www.mail-archive.com/gora-dev@incubator.apache.org/msg00241.html 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (GORA-53) Add Gora-Cassandra tests

2012-07-12 Thread Kazuomi Kashii (JIRA)

[ 
https://issues.apache.org/jira/browse/GORA-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13412911#comment-13412911
 ] 

Kazuomi Kashii commented on GORA-53:


It seems that setUp() is called at the beginning (twice), but not called every 
time,
though tearDown() is called every time.

...
12/07/12 09:04:58 INFO store.CassandraMapping: Added super column family: 'sc'
12/07/12 09:04:58 INFO gora.GoraTestDriver: setting up test
12/07/12 09:04:58 INFO store.CassandraClient: Keyspace 'Employee' in cluster 
'Gora Cassandra Test Cluster' was created on host 'localhost'
12/07/12 09:04:58 INFO store.CassandraClient: Keyspace 'Employee' in cluster 
'Gora Cassandra Test Cluster' was created on host 'localhost'
12/07/12 09:04:58 INFO store.DataStoreTestBase: test method: testNewInstance
12/07/12 09:04:58 INFO store.DataStoreTestBase: tearing down test
12/07/12 09:04:58 INFO gora.GoraTestDriver: tearing down test
12/07/12 09:04:58 INFO store.CassandraClient: 
me.prettyprint.hector.api.exceptions.HInvalidRequestException: 
InvalidRequestException(why:Cannot drop non existing keyspace 'Employee'.)
12/07/12 09:04:58 INFO store.DataStoreTestBase: test method: testCreateSchema
12/07/12 09:04:58 INFO store.DataStoreTestBase: tearing down test
12/07/12 09:04:58 INFO gora.GoraTestDriver: tearing down test
12/07/12 09:04:58 INFO store.DataStoreTestBase: test method: 
testAutoCreateSchema
12/07/12 09:04:58 INFO store.DataStoreTestBase: tearing down test
12/07/12 09:04:58 INFO gora.GoraTestDriver: tearing down test
12/07/12 09:04:58 INFO store.DataStoreTestBase: test method: testTruncateSchema
12/07/12 09:04:58 INFO store.DataStoreTestBase: tearing down test
12/07/12 09:04:58 INFO gora.GoraTestDriver: tearing down test
12/07/12 09:04:58 INFO store.DataStoreTestBase: test method: testDeleteSchema
12/07/12 09:04:58 INFO store.DataStoreTestBase: tearing down test
12/07/12 09:04:58 INFO gora.GoraTestDriver: tearing down test
...

 Add Gora-Cassandra tests
 

 Key: GORA-53
 URL: https://issues.apache.org/jira/browse/GORA-53
 Project: Apache Gora
  Issue Type: Improvement
  Components: storage-cassandra
Affects Versions: 0.1.1-incubating
Reporter: Lewis John McGibbney
Assignee: Lewis John McGibbney
Priority: Critical
 Fix For: 0.3

 Attachments: GORA-53-v2.patch, GORA-53.patch, GORA-54-v8.patch


 As per this thread [1], it is absolutely essential that we get some tests for 
 the Cassandra module. Therefore this task should act as a summary task to 
 manage all test which are hereby proposed.
 Realistically, this is going to take a good while, so I have marked it for 
 0.2 and 0.3-incubating releases.
 [1] http://www.mail-archive.com/gora-dev@incubator.apache.org/msg00241.html 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (GORA-53) Add Gora-Cassandra tests

2012-07-12 Thread Kazuomi Kashii (JIRA)

[ 
https://issues.apache.org/jira/browse/GORA-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13412989#comment-13412989
 ] 

Kazuomi Kashii commented on GORA-53:


Most of errors are name is null during tearDown() as follows:

Tests run: 51, Failures: 1, Errors: 48, Skipped: 0, Time elapsed: 92.342 sec 
 FAILURE!
testAutoCreateSchema(org.apache.gora.cassandra.store.TestCassandraStore)  Time 
elapsed: 0.31 sec   ERROR!
java.lang.IllegalArgumentException: name is null
at me.prettyprint.cassandra.utils.Assert.notNull(Assert.java:18)
at 
me.prettyprint.cassandra.model.HColumnImpl.init(HColumnImpl.java:36)
at 
me.prettyprint.hector.api.factory.HFactory.createColumn(HFactory.java:608)
at 
org.apache.gora.cassandra.store.CassandraClient.addColumn(CassandraClient.java:152)
at 
org.apache.gora.cassandra.store.CassandraStore.addOrUpdateField(CassandraStore.java:336)
at 
org.apache.gora.cassandra.store.CassandraStore.flush(CassandraStore.java:227)
at 
org.apache.gora.cassandra.store.CassandraStore.close(CassandraStore.java:94)
at org.apache.gora.GoraTestDriver.tearDown(GoraTestDriver.java:93)
at 
org.apache.gora.store.DataStoreTestBase.tearDown(DataStoreTestBase.java:115)
...



 Add Gora-Cassandra tests
 

 Key: GORA-53
 URL: https://issues.apache.org/jira/browse/GORA-53
 Project: Apache Gora
  Issue Type: Improvement
  Components: storage-cassandra
Affects Versions: 0.1.1-incubating
Reporter: Lewis John McGibbney
Assignee: Lewis John McGibbney
Priority: Critical
 Fix For: 0.3

 Attachments: GORA-53-v2.patch, GORA-53.patch, GORA-54-v8.patch


 As per this thread [1], it is absolutely essential that we get some tests for 
 the Cassandra module. Therefore this task should act as a summary task to 
 manage all test which are hereby proposed.
 Realistically, this is going to take a good while, so I have marked it for 
 0.2 and 0.3-incubating releases.
 [1] http://www.mail-archive.com/gora-dev@incubator.apache.org/msg00241.html 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (GORA-53) Add Gora-Cassandra tests

2012-07-12 Thread Kazuomi Kashii (JIRA)

[ 
https://issues.apache.org/jira/browse/GORA-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13412996#comment-13412996
 ] 

Kazuomi Kashii commented on GORA-53:


At CassandraClient.java:
 
 public void addColumn(K key, String fieldName, Object value) {
if (value == null) {
  return;
}

ByteBuffer byteBuffer = toByteBuffer(value);

String columnFamily = this.cassandraMapping.getFamily(fieldName);
String columnName = this.cassandraMapping.getColumn(fieldName);
   
LOG.info(columnFamily= + columnFamily +  columnName= + columnName +  
value= + value); // for debug

this.mutator.insert(key, columnFamily, HFactory.createColumn(columnName, 
byteBuffer, StringSerializer.get(), ByteBufferSerializer.get()));
  }

It printed:
12/07/12 10:40:46 INFO store.CassandraClient: columnFamily=p columnName=null 
value=Random Joe


 Add Gora-Cassandra tests
 

 Key: GORA-53
 URL: https://issues.apache.org/jira/browse/GORA-53
 Project: Apache Gora
  Issue Type: Improvement
  Components: storage-cassandra
Affects Versions: 0.1.1-incubating
Reporter: Lewis John McGibbney
Assignee: Lewis John McGibbney
Priority: Critical
 Fix For: 0.3

 Attachments: GORA-53-v2.patch, GORA-53.patch, GORA-54-v8.patch


 As per this thread [1], it is absolutely essential that we get some tests for 
 the Cassandra module. Therefore this task should act as a summary task to 
 manage all test which are hereby proposed.
 Realistically, this is going to take a good while, so I have marked it for 
 0.2 and 0.3-incubating releases.
 [1] http://www.mail-archive.com/gora-dev@incubator.apache.org/msg00241.html 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (GORA-53) Add Gora-Cassandra tests

2012-07-12 Thread Kazuomi Kashii (JIRA)

[ 
https://issues.apache.org/jira/browse/GORA-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13413021#comment-13413021
 ] 

Kazuomi Kashii commented on GORA-53:


We need cassandra-all for org.apache.cassandra.thrift.CassandraDaemon,
and cassadra-all depends on avro-1.4.0-cassandra-1.jar,
but we don't need avro-1.4.0-cassandra-1.jar at all,
and it conflicts with avro-1.3.3.jar.
We need to solve this dependency issue.

 Add Gora-Cassandra tests
 

 Key: GORA-53
 URL: https://issues.apache.org/jira/browse/GORA-53
 Project: Apache Gora
  Issue Type: Improvement
  Components: storage-cassandra
Affects Versions: 0.1.1-incubating
Reporter: Lewis John McGibbney
Assignee: Lewis John McGibbney
Priority: Critical
 Fix For: 0.3

 Attachments: GORA-53-v2.patch, GORA-53.patch, GORA-54-v8.patch


 As per this thread [1], it is absolutely essential that we get some tests for 
 the Cassandra module. Therefore this task should act as a summary task to 
 manage all test which are hereby proposed.
 Realistically, this is going to take a good while, so I have marked it for 
 0.2 and 0.3-incubating releases.
 [1] http://www.mail-archive.com/gora-dev@incubator.apache.org/msg00241.html 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (GORA-53) Add Gora-Cassandra tests

2012-07-12 Thread Kazuomi Kashii (JIRA)

[ 
https://issues.apache.org/jira/browse/GORA-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13413111#comment-13413111
 ] 

Kazuomi Kashii commented on GORA-53:


I manually edited 
~/.m2/repository/org/apache/cassandra/cassandra-all/1.1.0/cassandra-all-1.1.0.pom
to delete the followings from two places:

dependency
  groupIdorg.apache.cassandra.deps/groupId
  artifactIdavro/artifactId
  version1.4.0-cassandra-1/version
  exclusions
exclusion
  artifactIdnetty/artifactId
  groupIdorg.jboss.netty/groupId
/exclusion
exclusion
  artifactIdparanamer/artifactId
  groupIdcom.thoughtworks.paranamer/groupId
/exclusion
exclusion
  artifactIdparanamer-ant/artifactId
  groupIdcom.thoughtworks.paranamer/groupId
/exclusion
exclusion
  artifactIdvelocity/artifactId
  groupIdorg.apache.velocity/groupId
/exclusion
  /exclusions
/dependency

and it temporarily fixed the dependency issue.

However, I found the fatal problem in the code on CassandraMapping.java which 
supports only one keyspace and class,
so the test succeeds for Employee but fails for WebPage.
This should be filed as a separate bug.
 


 Add Gora-Cassandra tests
 

 Key: GORA-53
 URL: https://issues.apache.org/jira/browse/GORA-53
 Project: Apache Gora
  Issue Type: Improvement
  Components: storage-cassandra
Affects Versions: 0.1.1-incubating
Reporter: Lewis John McGibbney
Assignee: Lewis John McGibbney
Priority: Critical
 Fix For: 0.3

 Attachments: GORA-53-v2.patch, GORA-53.patch, GORA-54-v8.patch


 As per this thread [1], it is absolutely essential that we get some tests for 
 the Cassandra module. Therefore this task should act as a summary task to 
 manage all test which are hereby proposed.
 Realistically, this is going to take a good while, so I have marked it for 
 0.2 and 0.3-incubating releases.
 [1] http://www.mail-archive.com/gora-dev@incubator.apache.org/msg00241.html 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (GORA-148) CassandraMapping supports only (first) keyspace and class in gora-cassandra-mapping.xml

2012-07-12 Thread Kazuomi Kashii (JIRA)
Kazuomi Kashii created GORA-148:
---

 Summary: CassandraMapping supports only (first) keyspace and class 
in gora-cassandra-mapping.xml
 Key: GORA-148
 URL: https://issues.apache.org/jira/browse/GORA-148
 Project: Apache Gora
  Issue Type: Bug
  Components: storage-cassandra
Reporter: Kazuomi Kashii


CassandraMapping supports only (first) keyspace and class in 
gora-cassandra-mapping.xml.
GORA-53 tests two schemas Employee and WebPage, but only Employee is recognized 
by CassandraMapping,
so it fails to test WebPage stuffs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




Jenkins build became unstable: gora-trunk #345

2012-07-12 Thread Apache Jenkins Server
See https://builds.apache.org/job/gora-trunk/345/