You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2012/09/12 16:17:07 UTC

[jira] [Created] (LUCENE-4380) fix simplefs/niofshierarchy

Robert Muir created LUCENE-4380:
-----------------------------------

             Summary: fix simplefs/niofshierarchy
                 Key: LUCENE-4380
                 URL: https://issues.apache.org/jira/browse/LUCENE-4380
             Project: Lucene - Core
          Issue Type: Task
            Reporter: Robert Muir
         Attachments: LUCENE-4380.patch

spinoff from LUCENE-4371:

Currently NIOFSDirectory.NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput, but this isn't an is-a relationship at all.

Additionally SimpleFSDirectory has a funky Descriptor class that extends RandomAccessFile that is useless:
{noformat}
    /**
     * Extension of RandomAccessFile that tracks if the file is 
     * open.
     */
...
      // remember if the file is open, so that we don't try to close it
      // more than once
{noformat}

RandomAccessFile is closeable, this is not necessary and I don't think we should be subclassing it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-4380) fix simplefs/niofshierarchy

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455835#comment-13455835 ] 

Michael McCandless commented on LUCENE-4380:
--------------------------------------------

+1
                
> fix simplefs/niofshierarchy
> ---------------------------
>
>                 Key: LUCENE-4380
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4380
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-4380.patch, LUCENE-4380.patch
>
>
> spinoff from LUCENE-4371:
> Currently NIOFSDirectory.NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput, but this isn't an is-a relationship at all.
> Additionally SimpleFSDirectory has a funky Descriptor class that extends RandomAccessFile that is useless:
> {noformat}
>     /**
>      * Extension of RandomAccessFile that tracks if the file is 
>      * open.
>      */
> ...
>       // remember if the file is open, so that we don't try to close it
>       // more than once
> {noformat}
> RandomAccessFile is closeable, this is not necessary and I don't think we should be subclassing it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-4380) fix simplefs/niofshierarchy

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455855#comment-13455855 ] 

Robert Muir commented on LUCENE-4380:
-------------------------------------

I committed this to trunk.
                
> fix simplefs/niofshierarchy
> ---------------------------
>
>                 Key: LUCENE-4380
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4380
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-4380.patch, LUCENE-4380.patch
>
>
> spinoff from LUCENE-4371:
> Currently NIOFSDirectory.NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput, but this isn't an is-a relationship at all.
> Additionally SimpleFSDirectory has a funky Descriptor class that extends RandomAccessFile that is useless:
> {noformat}
>     /**
>      * Extension of RandomAccessFile that tracks if the file is 
>      * open.
>      */
> ...
>       // remember if the file is open, so that we don't try to close it
>       // more than once
> {noformat}
> RandomAccessFile is closeable, this is not necessary and I don't think we should be subclassing it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-4380) fix simplefs/niofshierarchy

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456083#comment-13456083 ] 

Uwe Schindler commented on LUCENE-4380:
---------------------------------------

+1, its fine to also backport, we should really do this, as we nned this for further improvements.
                
> fix simplefs/niofshierarchy
> ---------------------------
>
>                 Key: LUCENE-4380
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4380
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-4380.patch, LUCENE-4380.patch
>
>
> spinoff from LUCENE-4371:
> Currently NIOFSDirectory.NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput, but this isn't an is-a relationship at all.
> Additionally SimpleFSDirectory has a funky Descriptor class that extends RandomAccessFile that is useless:
> {noformat}
>     /**
>      * Extension of RandomAccessFile that tracks if the file is 
>      * open.
>      */
> ...
>       // remember if the file is open, so that we don't try to close it
>       // more than once
> {noformat}
> RandomAccessFile is closeable, this is not necessary and I don't think we should be subclassing it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-4380) fix simplefs/niofshierarchy

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-4380:
--------------------------------

    Attachment: LUCENE-4380.patch

Here's a patch: i factored the shared logic into an FSIndexInput (parallel with FSIndexOutput) instead.
                
> fix simplefs/niofshierarchy
> ---------------------------
>
>                 Key: LUCENE-4380
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4380
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-4380.patch
>
>
> spinoff from LUCENE-4371:
> Currently NIOFSDirectory.NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput, but this isn't an is-a relationship at all.
> Additionally SimpleFSDirectory has a funky Descriptor class that extends RandomAccessFile that is useless:
> {noformat}
>     /**
>      * Extension of RandomAccessFile that tracks if the file is 
>      * open.
>      */
> ...
>       // remember if the file is open, so that we don't try to close it
>       // more than once
> {noformat}
> RandomAccessFile is closeable, this is not necessary and I don't think we should be subclassing it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (LUCENE-4380) fix simplefs/niofshierarchy

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir resolved LUCENE-4380.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   5.0
    
> fix simplefs/niofshierarchy
> ---------------------------
>
>                 Key: LUCENE-4380
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4380
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>             Fix For: 5.0, 4.0
>
>         Attachments: LUCENE-4380.patch, LUCENE-4380.patch
>
>
> spinoff from LUCENE-4371:
> Currently NIOFSDirectory.NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput, but this isn't an is-a relationship at all.
> Additionally SimpleFSDirectory has a funky Descriptor class that extends RandomAccessFile that is useless:
> {noformat}
>     /**
>      * Extension of RandomAccessFile that tracks if the file is 
>      * open.
>      */
> ...
>       // remember if the file is open, so that we don't try to close it
>       // more than once
> {noformat}
> RandomAccessFile is closeable, this is not necessary and I don't think we should be subclassing it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-4380) fix simplefs/niofshierarchy

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-4380:
--------------------------------

    Attachment: LUCENE-4380.patch

updated patch, just javadocs and removed unused import and stuff like that (no real changes).

I'd like to commit this to trunk later today and bake it over the weekend.
                
> fix simplefs/niofshierarchy
> ---------------------------
>
>                 Key: LUCENE-4380
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4380
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-4380.patch, LUCENE-4380.patch
>
>
> spinoff from LUCENE-4371:
> Currently NIOFSDirectory.NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput, but this isn't an is-a relationship at all.
> Additionally SimpleFSDirectory has a funky Descriptor class that extends RandomAccessFile that is useless:
> {noformat}
>     /**
>      * Extension of RandomAccessFile that tracks if the file is 
>      * open.
>      */
> ...
>       // remember if the file is open, so that we don't try to close it
>       // more than once
> {noformat}
> RandomAccessFile is closeable, this is not necessary and I don't think we should be subclassing it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-4380) fix simplefs/niofshierarchy

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454495#comment-13454495 ] 

Michael McCandless commented on LUCENE-4380:
--------------------------------------------

+1, this is a very nice simplification.
                
> fix simplefs/niofshierarchy
> ---------------------------
>
>                 Key: LUCENE-4380
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4380
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-4380.patch
>
>
> spinoff from LUCENE-4371:
> Currently NIOFSDirectory.NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput, but this isn't an is-a relationship at all.
> Additionally SimpleFSDirectory has a funky Descriptor class that extends RandomAccessFile that is useless:
> {noformat}
>     /**
>      * Extension of RandomAccessFile that tracks if the file is 
>      * open.
>      */
> ...
>       // remember if the file is open, so that we don't try to close it
>       // more than once
> {noformat}
> RandomAccessFile is closeable, this is not necessary and I don't think we should be subclassing it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org