You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dave Brosius (Created) (JIRA)" <ji...@apache.org> on 2011/12/23 07:11:31 UTC

[jira] [Created] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

[patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
--------------------------------------------------------------------------------------------------

                 Key: CASSANDRA-3665
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
             Project: Cassandra
          Issue Type: Improvement
    Affects Versions: 1.0.6
            Reporter: Dave Brosius
         Attachments: fix_client_util_jar.diff

clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius updated CASSANDRA-3665:
------------------------------------

    Attachment: remove_commons_lang_dep.diff

remove the dependency on commons_lang for clientutils for something silly.
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.8
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 1.0.10
>
>         Attachments: fail_client_utils_test.diff, fix_client_util_jar.diff, remove_commons_lang_dep.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Eric Evans commented on CASSANDRA-3665:
---------------------------------------

Where does this list of additional classes come from?  Was it tested, and if so, against which version?

I'm not sure if it's the best tool, but according to tattletale (http://www.jboss.org/tattletale), the classes we are missing are {{o.a.c.io.util.FileDataInput}}, {{o.a.c.io.util.FileUtils}}, and {{o.a.c.utils.FBUtilities}}.  That's not including transitive dependencies, (for which {{FBUtilities}} alone is a nightmare).

Even manually searching through the code I can't see where {{o.a.c.utils.ClosableIterator}} or {{o.a.c.config.ConfigurationException}} are needed.

TL;DR Let me know if I'm missing something, but it looks like this patch is adding classes which are not needed, and missing some which are.

{{FBUtilities}} is being pulled in by {{ByteBufferUtil}}, so I think the right answer there is to refactor, and move the relevant bits out, either into {{ByteBufferUtil}}, or into another class entirely.
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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] [Reopened] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius reopened CASSANDRA-3665:
-------------------------------------


Found another problem:

Exception in thread "main" java.lang.NoClassDefFoundError: org/yaml/snakeyaml/error/YAMLException
	at org.apache.cassandra.utils.FBUtilities.getLocalAddress(FBUtilities.java:129)
	at org.apache.cassandra.utils.UUIDGen.createTimeUUIDBytes(UUIDGen.java:151)
	at org.apache.cassandra.utils.UUIDGen.getTimeUUIDBytes(UUIDGen.java:146)
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>             Fix For: 1.0.8
>
>         Attachments: fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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] [Issue Comment Edited] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

Posted by "Dave Brosius (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205977#comment-13205977 ] 

Dave Brosius edited comment on CASSANDRA-3665 at 2/11/12 2:14 AM:
------------------------------------------------------------------

Also ByteBufferUtil pulls in a dependency on commons-lang for the inconsequential

    public static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.wrap(ArrayUtils.EMPTY_BYTE_ARRAY);

which seems like a pitty.

could just be

    public static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBufferUtil.bytes("");

                
      was (Author: dbrosius@apache.org):
    Also ByteBufferUtils pulls in a dependency on commons-lang for the inconsequential

    public static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.wrap(ArrayUtils.EMPTY_BYTE_ARRAY);

which seems like a pitty.
                  
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>             Fix For: 1.0.8
>
>         Attachments: fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius commented on CASSANDRA-3665:
-----------------------------------------

I basically kept adding classes until the NoClassDefFoundExceptions stopped.
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius updated CASSANDRA-3665:
------------------------------------

    Attachment: fail_client_utils_test.diff

add test that shows the dependencies in client-utils.jar is still not right.
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.8
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>             Fix For: 1.0.9
>
>         Attachments: fail_client_utils_test.diff, fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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] [Issue Comment Edited] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

Posted by "Dave Brosius (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244914#comment-13244914 ] 

Dave Brosius edited comment on CASSANDRA-3665 at 4/3/12 1:55 AM:
-----------------------------------------------------------------

remove the dependency on commons_lang for clientutils for something silly.

remove_commons_lang_dep.diff

against trunk
                
      was (Author: dbrosius@apache.org):
    remove the dependency on commons_lang for clientutils for something silly.
                  
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.8
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 1.0.10
>
>         Attachments: fail_client_utils_test.diff, fix_client_util_jar.diff, remove_commons_lang_dep.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius updated CASSANDRA-3665:
------------------------------------

    Attachment: remove_commons_lang_dep.diff
    
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.8
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 1.0.10
>
>         Attachments: fail_client_utils_test.diff, fix_client_util_jar.diff, remove_commons_lang_dep.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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] [Issue Comment Edited] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

Posted by "Eric Evans (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194225#comment-13194225 ] 

Eric Evans edited comment on CASSANDRA-3665 at 1/26/12 10:24 PM:
-----------------------------------------------------------------

bq. UUIDGen.makeType1UUIDFromHost

Auh, there it is, a dependency on {{FBUtilities.hash()}}.

OK, since (sadly )smoke-testing seems to be the best way to go about this, the attached patches include a test that's meant to exercise the code in clientutil (including {{UUIDGen.makeType1UUIDFromHost}}), in order to spot the exceptions caused by unintentional dependencies.

And, instead of adding FBUtils to the jar (and the couple of dozen transitive dependencies), I added a hash function to {{UUIDGen}} (based on the one from FBUtils).

_Edit: Dave, could you test this and see if it solves your issue?_
                
      was (Author: urandom):
    bq. UUIDGen.makeType1UUIDFromHost

Auh, there it is, a dependency on {{FBUtilities.hash()}}.

OK, since (sadly )smoke-testing seems to be the best way to go about this, the attached patches include a test that's meant to exercise the code in clientutil (including {{UUIDGen.makeType1UUIDFromHost}}), in order to spot the exceptions caused by unintentional dependencies.

And, instead of adding FBUtils to the jar (and the couple of dozen transitive dependencies), I added a hash function to {{UUIDGen}} (based on the one from FBUtils).
                  
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Eric Evans commented on CASSANDRA-3665:
---------------------------------------

bq. remove the dependency on commons_lang for clientutils for something silly.

This one is applied, thanks.

As for the one meant to support {{UUIDGen.getTimeUUIDBytes()}}, make sure you are using {{ant test-clientutil-jar}} when you test.  That target has been setup to _only_ include the dependencies we're expecting, and nothing else.  That test fails with your other patches because, as I mentioned elsewhere, {{FBUtilities}} is a quagmire that requires pulling in many new dependencies.

I'm going to go ahead and close this issue, since the original scope has been met.  If you come up with a strategy to better support the non-essential parts of UUIDGen, or to further disentangle the dependencies, feel free to reopen it, or better yet open another, more specific issue.
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.8
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 1.0.10
>
>         Attachments: fail_client_utils_test.diff, fix_client_util_jar.diff, remove_commons_lang_dep.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius updated CASSANDRA-3665:
------------------------------------

    Attachment: fix_client_util_jar.diff
    
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>         Attachments: fix_client_util_jar.diff
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Rick Shaw commented on CASSANDRA-3665:
--------------------------------------

The Cassandra-jdbc client does not require the full cassandra jar? It builds and runs just fine. clientutil.jar was built for just such a purpose?
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius commented on CASSANDRA-3665:
-----------------------------------------

Sorry i should have added that at the time, it was post 1.0 for sure. But i still see it now, I am using

UUIDGen.makeType1UUIDFromHost

and it's throwing exceptions


UUIDGen.makeNode(InetAddress) line: 198	
UUIDGen.getClockSeqAndNode(InetAddress) line: 158
UUIDGen.makeType1UUIDFromHost(InetAddress) line: 61	
	


                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius commented on CASSANDRA-3665:
-----------------------------------------

Also ByteBufferUtils pulls in a dependency on commons-lang for the inconsequential

    public static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.wrap(ArrayUtils.EMPTY_BYTE_ARRAY);

which seems like a pitty.
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>             Fix For: 1.0.8
>
>         Attachments: fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Eric Evans updated CASSANDRA-3665:
----------------------------------

    Attachment: v1-0002-eliminate-dependency-on-FBUtilities.txt
                v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt
    
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Eric Evans commented on CASSANDRA-3665:
---------------------------------------

bq. UUIDGen.makeType1UUIDFromHost

Auh, there it is, a dependency on {{FBUtilities.hash()}}.

OK, since (sadly )smoke-testing seems to be the best way to go about this, the attached patches include a test that's meant to exercise the code in clientutil (including {{UUIDGen.makeType1UUIDFromHost}}), in order to spot the exceptions caused by unintentional dependencies.

And, instead of adding FBUtils to the jar (and the couple of dozen transitive dependencies), I added a hash function to {{UUIDGen}} (based on the one from FBUtils).
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Jonathan Ellis updated CASSANDRA-3665:
--------------------------------------

    Reviewer: urandom
    Assignee: Dave Brosius
    
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius updated CASSANDRA-3665:
------------------------------------

    Attachment:     (was: remove_commons_lang_dep.diff)
    
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.8
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 1.0.10
>
>         Attachments: fail_client_utils_test.diff, fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Dave Brosius commented on CASSANDRA-3665:
-----------------------------------------

Tested with patch applied, appears to resolve the issues I found. thanks.
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.6
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>         Attachments: fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

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

Eric Evans commented on CASSANDRA-3665:
---------------------------------------

For what it's worth, and whether or not it's Right, this was more or less intentional.  The only dependencies added were those needed by the classes in {{o.a.c.cql.jdbc}}. {{UUIDGen}} is an example of something that was added as a dependency (not to be used directly), and the only transient dependencies included were those needed by the methods the Jdbc* classes access.

TL;DR, that jar hasn't been setup to use {{UUIDGen.getTimeUUIDBytes()}}.

I realize that's probably not at all obvious though, so we should probably come up with a better solution (and open a separate ticket).

Unfortunately, simply including {{FBUtilities}} is non-trivial because that results in mountains of transient dependencies being pulled in.  I think we'll either need to refactor our way around {{FBUtilities}}, or split up {{UUIDGen}}.
                
> [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications
> --------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3665
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.0.8
>            Reporter: Dave Brosius
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 1.0.10
>
>         Attachments: fail_client_utils_test.diff, fix_client_util_jar.diff, v1-0001-CASSANDRA-3665-test-to-expose-missing-dependencies.txt, v1-0002-eliminate-dependency-on-FBUtilities.txt
>
>
> clientutil.jar can't be run from a client by itself without the presence of cassandra.jar which seems wrong. Added needed classes to run by itself.

--
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