[
https://issues.apache.org/jira/browse/PIG-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15602599#comment-15602599
]
Rohini Palaniswamy commented on PIG-5025:
-----------------------------------------
Sorry. Gmail has been filtering all the "xxxx mentioned you" mails from jira
into Promotions folder and I missed your earlier comments asking me to review.
Few more comments:
1)
Paths.get(Util.getTestDirectory(TestLoad.class)).toAbsolutePath().toString();
Can you add Util.getTestAbsoluteDirectory() method instead? You will also
have to handle Windows OS in that method by replacing \\ with /. For hdfs
modes, you will also have to get rid of : in the path. Refer
Util.generateURI(). So you will need two paths - one for local mode (with
colon) and one for hdfs mode (without colon). [~daijy], correct me if I am
wrong.
{code}
2) You will have to delete the working directory in oneTimeTearDown()
@AfterClass method.
> Improve TestLoad.java: use own separated folder under /tmp
> ----------------------------------------------------------
>
> Key: PIG-5025
> URL: https://issues.apache.org/jira/browse/PIG-5025
> Project: Pig
> Issue Type: Improvement
> Reporter: Adam Szita
> Assignee: Adam Szita
> Priority: Minor
> Attachments: PIG-5025.1.patch, PIG-5025.2.patch, PIG-5025.patch
>
>
> Test cases testCommaSeparatedString2 and testGlobChars may fail if for some
> reason files (from any other sources) in /tmp have : (colon) in the
> filenames. This is because HDFS doesn't support colon since it has its own
> URI handling. Exception below.
> I propose we separate the working dir of these tests to use their own folder
> in /tmp.
> Failed to parse: java.net.URISyntaxException: Relative path in absolute URI:
> t:2sTest.txt
> at
> org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:198)
> at org.apache.pig.test.TestLoad.checkLoadPath(TestLoad.java:317)
> at org.apache.pig.test.TestLoad.checkLoadPath(TestLoad.java:299)
> at
> org.apache.pig.test.TestLoad.testCommaSeparatedString2(TestLoad.java:189)
> Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException:
> Relative path in absolute URI: t:2sTest.txt
> at org.apache.hadoop.fs.Path.initialize(Path.java:206)
> at org.apache.hadoop.fs.Path.<init>(Path.java:172)
> at org.apache.hadoop.fs.Path.<init>(Path.java:94)
> at org.apache.hadoop.fs.Globber.doGlob(Globber.java:260)
> at org.apache.hadoop.fs.Globber.glob(Globber.java:151)
> at org.apache.hadoop.fs.FileSystem.globStatus(FileSystem.java:1637)
> at
> org.apache.pig.backend.hadoop.datastorage.HDataStorage.asCollection(HDataStorage.java:215)
> at
> org.apache.pig.backend.hadoop.datastorage.HDataStorage.asCollection(HDataStorage.java:41)
> at
> org.apache.pig.builtin.JsonMetadata.findMetaFile(JsonMetadata.java:119)
> at org.apache.pig.builtin.JsonMetadata.getSchema(JsonMetadata.java:191)
> at org.apache.pig.builtin.PigStorage.getSchema(PigStorage.java:518)
> at
> org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:175)
> at
> org.apache.pig.newplan.logical.relational.LOLoad.<init>(LOLoad.java:89)
> at
> org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:866)
> at
> org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3568)
> at
> org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1625)
> at
> org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:1102)
> at
> org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:560)
> at
> org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:421)
> at
> org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:188)
> Caused by: java.net.URISyntaxException: Relative path in absolute URI:
> t:2sTest.txt
> at java.net.URI.checkPath(URI.java:1823)
> at java.net.URI.<init>(URI.java:745)
> at org.apache.hadoop.fs.Path.initialize(Path.java:203)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)