You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Yiping Han (JIRA)" <ji...@apache.org> on 2008/07/08 19:18:31 UTC
[jira] Created: (PIG-297) RM a non-existing file should not fail
the script
RM a non-existing file should not fail the script
-------------------------------------------------
Key: PIG-297
URL: https://issues.apache.org/jira/browse/PIG-297
Project: Pig
Issue Type: Improvement
Components: grunt
Reporter: Yiping Han
Priority: Minor
rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiping Han updated PIG-297:
---------------------------
Attachment: PIG-297.patch
We believe that remove a non-existing file should not be a fatal error. With the patch, grunt still shows the error message but no longer throw the exception, which fails the execution of script.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiping Han updated PIG-297:
---------------------------
Status: Patch Available (was: Open)
We believe that remove a non-existing file should not be a fatal error. With the patch, grunt still shows the error message but no longer throw the exception, which fails the execution of script.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiping Han updated PIG-297:
---------------------------
Status: Open (was: Patch Available)
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616311#action_12616311 ]
Olga Natkovich commented on PIG-297:
------------------------------------
I have not tested the patch yet but it looks good. One question is that you have function GetOption that does not seem to be used.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch, PIG-297v2.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiping Han updated PIG-297:
---------------------------
Status: Patch Available (was: Open)
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch, PIG-297v2.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiping Han updated PIG-297:
---------------------------
Comment: was deleted
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621557#action_12621557 ]
Yiping Han commented on PIG-297:
--------------------------------
'kk. np. I've manually applied the patch to types for now.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch, PIG-297v2.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616312#action_12616312 ]
Yiping Han commented on PIG-297:
--------------------------------
I could remove that function, if necessary.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch, PIG-297v2.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiping Han updated PIG-297:
---------------------------
Attachment: PIG-297v2.patch
I made a new patch following Olga's suggestion.
With the new patch,
RM following the Unix rm style. User specify the -f option
rm [-f|-force] FILES...
If -f option is specified, only an error message printed but there is no exception so the script won't fail. If an invalid option specified, an exception will be thrown.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch, PIG-297v2.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-297:
-------------------------------
Status: Open (was: Patch Available)
I think we should maintain the same semantics as Unix:
rm of non-existent file is an error
rm -f on non-existent file is ok.
So I propose that we add -f option to rm instead.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621540#action_12621540 ]
Yiping Han commented on PIG-297:
--------------------------------
Olga,
Sorry I forgot to commit this patch earlier. I tried to commit to trunk but get the following error:
svn: Commit failed (details follow):
svn: MKACTIVITY of '/repos/asf/!svn/act/ac64515e-3354-0410-a5ea-df30a820cf8c': 403 Forbidden (http://svn.apache.org)
svn: Your commit message was left in a temporary file:
No privilege for me?
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch, PIG-297v2.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiping Han updated PIG-297:
---------------------------
Comment: was deleted
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621555#action_12621555 ]
Olga Natkovich commented on PIG-297:
------------------------------------
Hi Yiping, unfortunately, you can't commit - only committers on the project can.
Given that pretty soon we will be merging types branch to the trank, we will apply your patch after that.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch, PIG-297v2.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yiping Han updated PIG-297:
---------------------------
Status: Patch Available (was: Open)
Index: GruntParser.java
===================================================================
--- GruntParser.java (revision 8658)
+++ GruntParser.java (working copy)
@@ -466,7 +466,8 @@
sb.append("File or directory ");
sb.append(path);
sb.append(" does not exist.");
- throw new IOException(sb.toString());
+ //throw new IOException(sb.toString());
+ System.out.println(sb);
}
dfsPath.delete();
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614821#action_12614821 ]
Olga Natkovich commented on PIG-297:
------------------------------------
I don't have anybody to do this right now. Feel free to submit another patch. I would be happy to roll it in.
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Yiping Han (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614816#action_12614816 ]
Yiping Han commented on PIG-297:
--------------------------------
Olga, I would support your proposal. My patch is a quick recipe for myself:-) Do you have anyone to make the quick change or I just submit another patch?
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-297) RM a non-existing file should not fail
the script
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616315#action_12616315 ]
Olga Natkovich commented on PIG-297:
------------------------------------
It is fine either way - I just was not sure if you intended to use it but then forgot to change code.
Also, I assume that this patch is to be applied to the trunk. Is this correct?
> RM a non-existing file should not fail the script
> -------------------------------------------------
>
> Key: PIG-297
> URL: https://issues.apache.org/jira/browse/PIG-297
> Project: Pig
> Issue Type: Improvement
> Components: grunt
> Reporter: Yiping Han
> Priority: Minor
> Attachments: PIG-297.patch, PIG-297v2.patch
>
>
> rm is commonly used to remove the existing output before re-execute a script. However, when the output is not existing, rm will fail and grunt will terminate the execution. Such a behavior is very inconvenience. Expected grunt behavior would print some error message and continue to execute the script.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.