hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Kellerman (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-4379) In HDFS, sync() not yet guarantees data available to the new readers
Date Thu, 26 Feb 2009 20:35:02 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-4379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677135#action_12677135

Jim Kellerman commented on HADOOP-4379:

> dhruba borthakur - 26/Feb/09 11:35 AM
> @Jim: Were u using ReopenProblem.java:waitForLeaseRecovery() and still seeing that it
takes upto an hour for the
> waitForLeaseRecovery() method to return success?

Well, sort of. my code is similar but inline in the module that uses it:
        // Recover the files lease if necessary
boolean recovered = false;
while (!recovered) {
  try {
    FSDataOutputStream out = fs.append(logfiles[i].getPath());
    recovered = true;
  } catch (IOException e) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Triggering lease recovery.");
    try {
    } catch (InterruptedException ex) {
      // ignore it and try again
> This can happen if the original client that was writing to the file was alive and was
in communication with the namenode.
> In this case, the new append-er will not be able to recover the original lease.

This was definitely not the case. The original writing process was kill'ed -9

Like Hypertable, HBase has a mechanism to detect when the original writing process is dead.

> In HDFS, sync() not yet guarantees data available to the new readers
> --------------------------------------------------------------------
>                 Key: HADOOP-4379
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4379
>             Project: Hadoop Core
>          Issue Type: New Feature
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.19.2, 0.20.0
>         Attachments: 4379_20081010TC3.java, fsyncConcurrentReaders.txt, fsyncConcurrentReaders3.patch,
fsyncConcurrentReaders4.patch, hypertable-namenode.log.gz, Reader.java, Reader.java, reopen_test.sh,
ReopenProblem.java, Writer.java, Writer.java
> In the append design doc (https://issues.apache.org/jira/secure/attachment/12370562/Appends.doc),
it says
> * A reader is guaranteed to be able to read data that was 'flushed' before the reader
opened the file
> However, this feature is not yet implemented.  Note that the operation 'flushed' is now
called "sync".

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

View raw message