pinot-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-pinot] siddharthteotia opened a new issue #5044: mvn test fails
Date Mon, 03 Feb 2020 21:11:50 GMT
siddharthteotia opened a new issue #5044: mvn test fails
URL: https://github.com/apache/incubator-pinot/issues/5044
 
 
   While rebasing on latest master, our release jobs failed 
   
   `java.io.FileNotFoundException: file://some/path/pinot/pinot-integration-tests/target/pinot-integration-tests-0.3.0-SNAPSHOT-tests.jar!/On_Time_On_Time_Performance_2014_100k_subset_nonulls.schema
(No such file or directory)
   51460         at java.io.FileInputStream.open0(Native Method)
   51461         at java.io.FileInputStream.open(FileInputStream.java:195)
   51462         at java.io.FileInputStream.<init>(FileInputStream.java:138)
   51463         at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:766)
   51464         at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1262)
   51465         at org.apache.pinot.spi.utils.JsonUtils.fileToObject(JsonUtils.java:68)
   51466         at org.apache.pinot.spi.data.Schema.fromFile(Schema.java:75)
   51467         at org.apache.pinot.integration.tests.HadoopSegmentBuildPushOfflineClusterIntegrationTest.setUp(HadoopSegmentBuildPushOfflineClusterIntegrationTest.java:94)`
   
   This can also be reproduced locally by doing mvn test. 
   
   It looks like getClassLoader().getResource(getSchemaFileName()) works as long as the resource
is a physical file. In this case, the resource is a schema file in the test-jar produced when
pinot-integration-tests module was built -- this is why there is an exclamation mark in the
path at the end of jar file name. 
   
   This link seems to suggest that we should be doing getResourceAsStream() in such cases
when the resource file is inside a bundled jar.
   
   https://stackoverflow.com/questions/26675048/classloader-getresource-doesnt-work-in-jar-file/26675158
   
   One another way is to probably copy this schema file in src/test/resources folder for pinot-hadoop
module.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Mime
View raw message