hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Wyckoff (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-4109) FileSystem support for posix truncate method
Date Wed, 10 Sep 2008 07:18:47 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pete Wyckoff updated HADOOP-4109:
---------------------------------

    Description: 
{code}

    void truncate(Path path, long offset) throws IOException;

{code}
from man truncate:

DESCRIPTION
       The truncate and ftruncate functions cause the regular file named by path or referenced
by fd to be truncated to a size of precisely length bytes.

       If the file previously was larger than this size, the extra data is lost.  If the file
previously was shorter, it is extended, and the extended part reads as zero bytes.

       The file pointer is not changed.

       If the size changed, then the ctime and mtime fields for the file are updated, and
suid and sgid mode bits may be cleared.

       With ftruncate, the file must be open for writing; with truncate, the file must be
writable.

RETURN VALUE
       On success, zero is returned.  On error, -1 is returned, and errno is set appropriately.



  was:
from man truncate:
{code}

       int truncate(const char *path, off_t length);
{code}

DESCRIPTION
       The truncate and ftruncate functions cause the regular file named by path or referenced
by fd to be truncated to a size of precisely length bytes.

       If the file previously was larger than this size, the extra data is lost.  If the file
previously was shorter, it is extended, and the extended part reads as zero bytes.

       The file pointer is not changed.

       If the size changed, then the ctime and mtime fields for the file are updated, and
suid and sgid mode bits may be cleared.

       With ftruncate, the file must be open for writing; with truncate, the file must be
writable.

RETURN VALUE
       On success, zero is returned.  On error, -1 is returned, and errno is set appropriately.




> FileSystem support for posix truncate method
> --------------------------------------------
>
>                 Key: HADOOP-4109
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4109
>             Project: Hadoop Core
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Pete Wyckoff
>
> {code}
>     void truncate(Path path, long offset) throws IOException;
> {code}
> from man truncate:
> DESCRIPTION
>        The truncate and ftruncate functions cause the regular file named by path or referenced
by fd to be truncated to a size of precisely length bytes.
>        If the file previously was larger than this size, the extra data is lost.  If
the file previously was shorter, it is extended, and the extended part reads as zero bytes.
>        The file pointer is not changed.
>        If the size changed, then the ctime and mtime fields for the file are updated,
and suid and sgid mode bits may be cleared.
>        With ftruncate, the file must be open for writing; with truncate, the file must
be writable.
> RETURN VALUE
>        On success, zero is returned.  On error, -1 is returned, and errno is set appropriately.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message