namhnguyen / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Metadata query test failure in stabilization branch #212

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run mvn package on the latest stabilization version

What is the expected output? What do you see instead?
Expected:
No failure tests.

Actual:
-------------------------------------------------------------------------------
Test set: edu.uci.ics.asterix.test.metadata.MetadataTest
-------------------------------------------------------------------------------
Tests run: 31, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.482 sec <<< 
FAILURE!
test[26](edu.uci.ics.asterix.test.metadata.MetadataTest)  Time elapsed: 0.048 
sec  <<< ERROR!
java.lang.Exception: Result for 
src/test/resources/metadata/queries/custord_q10.aql changed at line 8:
< { "DataverseName": "custord", "DatasetName": "Customers", "DataTypeName": 
"CustomerType", "DatasetType": "EXTERNAL", "InternalDetails": null, 
"ExternalDetails": { "Adapter": 
"edu.uci.ics.asterix.external.dataset.adapter.HDFSAdapter", "Properties": [ { 
"Name": "n1", "Value": "v1" }, { "Name": "n3", "Value": "v3" }, { "Name": "n2", 
"Value": "v2" }, { "Name": "hdfs", "Value": "hdfs://temp1/data1" } ] }, 
"FeedDetails": null, "Timestamp": "Thu Sep 13 15:13:43 PDT 2012" }
> { "DataverseName": "custord", "DatasetName": "Customers", "DataTypeName": 
"CustomerType", "DatasetType": "EXTERNAL", "InternalDetails": null, 
"ExternalDetails": { "Adapter": 
"edu.uci.ics.asterix.external.dataset.adapter.HDFSAdapter", "Properties": [ { 
"Name": "n1", "Value": "v1" }, { "Name": "hdfs", "Value": "hdfs://temp1/data1" 
}, { "Name": "n3", "Value": "v3" }, { "Name": "n2", "Value": "v2" } ] }, 
"FeedDetails": null, "Timestamp": "Sat Oct 20 17:38:28 PDT 2012" }
    at edu.uci.ics.asterix.test.metadata.MetadataTest.test(MetadataTest.java:157)
    at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
    at $Proxy0.invoke(Unknown Source)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

Please use labels and text to provide additional information.
This error cannot be repeated in the eclipse environment; all metadata tests 
passed when running in eclipse separately. But it fails under command line. 

Original issue reported on code.google.com by jarod...@gmail.com on 21 Oct 2012 at 12:55

GoogleCodeExporter commented 9 years ago
And this exception cannot be repeated on a linux machine (fedora 16 x64).

Original comment by jarod...@gmail.com on 26 Oct 2012 at 6:03

GoogleCodeExporter commented 9 years ago
It turns out to be a Java 7 problem. Just tested Java 1.6 and no error.

Original comment by jarod...@gmail.com on 26 Oct 2012 at 6:27

GoogleCodeExporter commented 9 years ago
It's gone in the latest stabilization branch. Cannot repeat anymore.

Original comment by jarod...@gmail.com on 18 Nov 2012 at 5:53

GoogleCodeExporter commented 9 years ago
The same bug shows up again in the latest stabilization branch (r1123). Here is 
the failure report:

-------------------------------------------------------------------------------
Test set: edu.uci.ics.asterix.test.runtime.ExecutionTest
-------------------------------------------------------------------------------
Tests run: 615, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 76.163 sec 
<<< FAILURE!
test[607](edu.uci.ics.asterix.test.runtime.ExecutionTest)  Time elapsed: 0.072 
sec  <<< FAILURE!
java.lang.AssertionError: Result for 
src/test/resources/runtimets/queries/feeds/feeds_01.aql changed at line 1:
< { "DataverseName": "feeds", "DatasetName": "TweetFeed", "DataTypeName": 
"TweetType", "DatasetType": "FEED", "InternalDetails": null, "ExternalDetails": 
null, "FeedDetails": { "FileStructure": "BTREE", "PartitioningStrategy": 
"HASH", "PartitioningKey": [ "id" ], "PrimaryKey": [ "id" ], "GroupName": 
"DEFAULT_NG_ALL_NODES", "DatasourceAdapter": 
"edu.uci.ics.asterix.tools.external.data.RateControlledFileSystemBasedAdapterFac
tory", "Properties": [ { "Name": "output-type-name", "Value": "TweetType" }, { 
"Name": "fs", "Value": "localfs" }, { "Name": "path", "Value": 
"nc1://data/twitter/obamatweets.adm" }, { "Name": "format", "Value": "adm" }, { 
"Name": "tuple-interval", "Value": "10" } ], "Function": null, "Status": 
"INACTIVE" }, "Timestamp": "Mon Dec 24 13:51:31 PST 2012" }
> { "DataverseName": "feeds", "DatasetName": "TweetFeed", "DataTypeName": 
"TweetType", "DatasetType": "FEED", "InternalDetails": null, "ExternalDetails": 
null, "FeedDetails": { "FileStructure": "BTREE", "PartitioningStrategy": 
"HASH", "PartitioningKey": [ "id" ], "PrimaryKey": [ "id" ], "GroupName": 
"DEFAULT_NG_ALL_NODES", "DatasourceAdapter": 
"edu.uci.ics.asterix.tools.external.data.RateControlledFileSystemBasedAdapterFac
tory", "Properties": [ { "Name": "fs", "Value": "localfs" }, { "Name": "path", 
"Value": "nc1://data/twitter/obamatweets.adm" }, { "Name": "format", "Value": 
"adm" }, { "Name": "output-type-name", "Value": "TweetType" }, { "Name": 
"tuple-interval", "Value": "10" } ], "Function": null, "Status": "INACTIVE" }, 
"Timestamp": "Mon Feb 04 21:49:50 PST 2013" }
    at org.junit.Assert.fail(Assert.java:91)
    at edu.uci.ics.asterix.test.aql.TestsUtils.runScriptAndCompareWithResult(TestsUtils.java:77)
    at edu.uci.ics.asterix.test.runtime.ExecutionTest.test(ExecutionTest.java:107)
    at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
    at $Proxy0.invoke(Unknown Source)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

test[609](edu.uci.ics.asterix.test.runtime.ExecutionTest)  Time elapsed: 0.021 
sec  <<< FAILURE!
java.lang.AssertionError: Result for 
src/test/resources/runtimets/queries/feeds/feeds_03.aql changed at line 1:
< { "DataverseName": "feeds", "DatasetName": "TweetFeed", "DataTypeName": 
"TweetType", "DatasetType": "FEED", "InternalDetails": null, "ExternalDetails": 
null, "FeedDetails": { "FileStructure": "BTREE", "PartitioningStrategy": 
"HASH", "PartitioningKey": [ "id" ], "PrimaryKey": [ "id" ], "GroupName": 
"DEFAULT_NG_ALL_NODES", "DatasourceAdapter": 
"edu.uci.ics.asterix.tools.external.data.RateControlledFileSystemBasedAdapterFac
tory", "Properties": [ { "Name": "output-type-name", "Value": "TweetType" }, { 
"Name": "fs", "Value": "localfs" }, { "Name": "path", "Value": 
"nc1://data/twitter/obamatweets.adm" }, { "Name": "format", "Value": "adm" }, { 
"Name": "tuple-interval", "Value": "10" } ], "Function": 
"feeds.feed_processor@1", "Status": "INACTIVE" }, "Timestamp": "Mon Dec 24 
13:49:20 PST 2012" }
> { "DataverseName": "feeds", "DatasetName": "TweetFeed", "DataTypeName": 
"TweetType", "DatasetType": "FEED", "InternalDetails": null, "ExternalDetails": 
null, "FeedDetails": { "FileStructure": "BTREE", "PartitioningStrategy": 
"HASH", "PartitioningKey": [ "id" ], "PrimaryKey": [ "id" ], "GroupName": 
"DEFAULT_NG_ALL_NODES", "DatasourceAdapter": 
"edu.uci.ics.asterix.tools.external.data.RateControlledFileSystemBasedAdapterFac
tory", "Properties": [ { "Name": "fs", "Value": "localfs" }, { "Name": "path", 
"Value": "nc1://data/twitter/obamatweets.adm" }, { "Name": "format", "Value": 
"adm" }, { "Name": "output-type-name", "Value": "TweetType" }, { "Name": 
"tuple-interval", "Value": "10" } ], "Function": "feeds.feed_processor@1", 
"Status": "INACTIVE" }, "Timestamp": "Mon Feb 04 21:49:50 PST 2013" }
    at org.junit.Assert.fail(Assert.java:91)
    at edu.uci.ics.asterix.test.aql.TestsUtils.runScriptAndCompareWithResult(TestsUtils.java:77)
    at edu.uci.ics.asterix.test.runtime.ExecutionTest.test(ExecutionTest.java:107)
    at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
    at $Proxy0.invoke(Unknown Source)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:74)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

Original comment by jarod...@gmail.com on 5 Feb 2013 at 5:55

GoogleCodeExporter commented 9 years ago
and also, the error only shows under Java 7 + mac. Java 6 + mac works well.

Original comment by jarod...@gmail.com on 5 Feb 2013 at 5:56

GoogleCodeExporter commented 9 years ago
I can confirm the issue.

Same behavior on my machine:
OSX 10.8.2
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)

Original comment by diegogio...@gmail.com on 6 Feb 2013 at 1:55

GoogleCodeExporter commented 9 years ago
Reassign to Diego as he has the fix now.

Original comment by jarod...@gmail.com on 6 Feb 2013 at 2:31

GoogleCodeExporter commented 9 years ago
Quick fix attached.

The main reason is the wrong use of HashMap when we check for the correct order.
Indeed hashmap doesn't guarantee the internal ordering.

Plus in java7 a new hashmap algorithm is introduced.
Currently is disabled by default but it will be ENABLED by default in java8!
I am not sure but it might be that in the mac version the new algorithm is 
already enabled.
more info here: 
http://maroph.blogspot.com/2012/08/new-feature-in-java-se-7-update-6.html

Original comment by diegogio...@gmail.com on 11 Feb 2013 at 4:14

Attachments:

GoogleCodeExporter commented 9 years ago
Great! Thanks Diego for the nice shot!

Original comment by jarod...@gmail.com on 11 Feb 2013 at 4:22

GoogleCodeExporter commented 9 years ago

Original comment by diegogio...@gmail.com on 14 Feb 2013 at 7:44