You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (Created) (JIRA)" <ji...@apache.org> on 2012/01/13 00:07:39 UTC

[jira] [Created] (CASSANDRA-3734) Support native link w/o JNA in Java7

Support native link w/o JNA in Java7
------------------------------------

                 Key: CASSANDRA-3734
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3734
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
            Reporter: Jonathan Ellis
            Priority: Minor
             Fix For: 1.2


Java7 provides native support for hard links: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path, java.nio.file.Path)

We should prefer this method when Java7 is the host.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3734) Support native link w/o JNA in Java7

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203402#comment-13203402 ] 

Sylvain Lebresne commented on CASSANDRA-3734:
---------------------------------------------

(sadpanda)
                
> Support native link w/o JNA in Java7
> ------------------------------------
>
>                 Key: CASSANDRA-3734
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3734
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Peter Schuller
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: CASSANDRA-3734-trunk-v1.txt
>
>
> Java7 provides native support for hard links: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path, java.nio.file.Path)
> We should prefer this method when Java7 is the host.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3734) Support native link w/o JNA in Java7

Posted by "Peter Schuller (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Schuller updated CASSANDRA-3734:
--------------------------------------

    Attachment: CASSANDRA-3734-trunk-v1.txt

Attached patch. Creates a {{NativeFileSystem}} interface, with a {{Java6}} and {{Java7}} implementation. FileUtils.createHardLink() created, and the decision on which backend to use happens upon static initialization of FileUtils based on whether nio2 classes seem to be available.

Broke tradition and named arguments "existing" and "link" instead of "source" and "dest" to make it less possible to confuse the "direction" of linking.

Added a temporary directory creation utility to FileUtil while at it (instead of using the racy create-file-delete-mkdir approach).

Unit tests always test the java6 version, and tests the java7 version if on java7.

                
> Support native link w/o JNA in Java7
> ------------------------------------
>
>                 Key: CASSANDRA-3734
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3734
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Peter Schuller
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: CASSANDRA-3734-trunk-v1.txt
>
>
> Java7 provides native support for hard links: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path, java.nio.file.Path)
> We should prefer this method when Java7 is the host.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CASSANDRA-3734) Support native link w/o JNA in Java7

Posted by "Peter Schuller (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Schuller reassigned CASSANDRA-3734:
-----------------------------------------

    Assignee: Peter Schuller
    
> Support native link w/o JNA in Java7
> ------------------------------------
>
>                 Key: CASSANDRA-3734
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3734
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Peter Schuller
>            Priority: Minor
>             Fix For: 1.2
>
>
> Java7 provides native support for hard links: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path, java.nio.file.Path)
> We should prefer this method when Java7 is the host.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3734) Support native link w/o JNA in Java7

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203287#comment-13203287 ] 

Jonathan Ellis commented on CASSANDRA-3734:
-------------------------------------------

bq. if we do, looking forward to use a few of the project coin goodies 

I don't think this is supported: java7 can compile a java6-compatible classfile ("-target 1.6") but requires that it be java6-compatible source as well.  Too bad!
                
> Support native link w/o JNA in Java7
> ------------------------------------
>
>                 Key: CASSANDRA-3734
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3734
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Peter Schuller
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: CASSANDRA-3734-trunk-v1.txt
>
>
> Java7 provides native support for hard links: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path, java.nio.file.Path)
> We should prefer this method when Java7 is the host.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3734) Support native link w/o JNA in Java7

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185325#comment-13185325 ] 

Jonathan Ellis commented on CASSANDRA-3734:
-------------------------------------------

http://stackoverflow.com/a/4526126 explains how to stub this in with an interface so we can continue to use JNA/exec for Java6 hosts.  (But, developers will need Java7 to build.)
                
> Support native link w/o JNA in Java7
> ------------------------------------
>
>                 Key: CASSANDRA-3734
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3734
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.2
>
>
> Java7 provides native support for hard links: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path, java.nio.file.Path)
> We should prefer this method when Java7 is the host.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3734) Support native link w/o JNA in Java7

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185598#comment-13185598 ] 

Jonathan Ellis commented on CASSANDRA-3734:
-------------------------------------------

It better be, because "Java SE 6 will no longer be publicly available after July 2012." http://www.oracle.com/technetwork/java/eol-135779.html
                
> Support native link w/o JNA in Java7
> ------------------------------------
>
>                 Key: CASSANDRA-3734
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3734
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.2
>
>
> Java7 provides native support for hard links: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path, java.nio.file.Path)
> We should prefer this method when Java7 is the host.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3734) Support native link w/o JNA in Java7

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185555#comment-13185555 ] 

Sylvain Lebresne commented on CASSANDRA-3734:
---------------------------------------------

I guess the smallish question is 'do we trust java7 compiler to be mature enough at this point'. But if we do, looking forward to use a few of the project coin goodies :)
                
> Support native link w/o JNA in Java7
> ------------------------------------
>
>                 Key: CASSANDRA-3734
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3734
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.2
>
>
> Java7 provides native support for hard links: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path, java.nio.file.Path)
> We should prefer this method when Java7 is the host.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira